-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
hotfix: graphql connection error handler #4523
hotfix: graphql connection error handler #4523
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the introspection attempt fails on the active endpoint with a non-Agent (given Agent is registered) interceptor, the Connect
button goes to an infinite loading state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
The
Browser extension
is not installed and set as the active interceptor, the corresponding error state isn't displayed in the response section. -
For the error toast displayed when the introspection attempt fails while attempting to connect, we'll have to exclude it for the case when
Browser extension
is the active interceptor where the message displayed saysHeading not found
. Also, since a connection attempt is performed while sending a request, currently it results in an error toast due to the introspection query failing following a success toast saying the query succeeded in the given time frame and might not be necessary in such a case.
This pull request fixes the error handling for GraphQL connections. It adds a new error message for HTTP errors and updates the connection state to "ERROR" when an HTTP error occurs.
Context: Previously, attempting to send a request would toggle the connection state reflecting in the
Connect
button. However, the schema fetch doesn't happen, and the request goes through regardless of whether the introspection attempt fails. With #4516, the schema fetch attempt takes place before sending a request and a failure in this phase would affect the overall request execution flow. With the proposed changes, the introspection query (schema fetch) failing with a non-200
status code is accounted for with relevant error handlers ensuring the request execution goes through even if the schema fetch attempt fails.