Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display error message from server on introspection errors #6419

Open
sproctor opened this issue Mar 11, 2025 · 2 comments
Open

Display error message from server on introspection errors #6419

sproctor opened this issue Mar 11, 2025 · 2 comments

Comments

@sproctor
Copy link
Contributor

Use case

When Supabase encounters a malformed comment, it returns an error to introspection requests. It would be nice to see that error.

Describe the solution you'd like

Currently when the server has an error, ./gradlew downloadServiceApolloSchemaFromIntrospection displays this message:

java.lang.Exception: Introspection response from http://127.0.0.1:54321/graphql/v1 can not be parsed

The response from the server was:

{
  "data": null,
  "errors": [
    {
      "message": "invalid input syntax for type json"
    }
  ]
}

In that case, it would be nice if Apollo gracefully handled the error and displayed the message from the server.

@BoD
Copy link
Contributor

BoD commented Mar 11, 2025

We could certainly improve the message. Passing --stacktrace to the gradle invocation does show more info but only the first 50 characters of the received document are shown.

@sproctor
Copy link
Contributor Author

Thanks! I did run it with --stacktrace, but I didn't notice that the message was actually in the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants