You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm fetching a query in Apollo and the result handler provides an optional result and error object.
apollo.fetch(query: SampleQuery()) { (result, error) in
If the error is non-nil I present this error's localizedDescription to the user (and if it's not then I check if the result's errors is not empty and use the first error's localizedDescription). At times the user can be shown a very unfriendly message from that outer error, such as
Received error response (500 internal server error): {"errors":[{"message":"Context creation failed: Invalid app info headers.","extensions":{"code":"INTERNAL_SERVER_ERROR"}}]}
It seems this is the case when the error is a GraphQLHTTPResponseError. Could we get a friendly localizedDescription out of these errors?
The text was updated successfully, but these errors were encountered:
Since I haven't heard back here in a couple of weeks, I'm going to close this issue out. If you're still having problems with newer versions of Apollo, please open a new issue. Thank you!
I'm fetching a query in Apollo and the result handler provides an optional result and error object.
apollo.fetch(query: SampleQuery()) { (result, error) in
If the error is non-nil I present this error's
localizedDescription
to the user (and if it's not then I check if the result's errors is not empty and use the first error'slocalizedDescription
). At times the user can be shown a very unfriendly message from that outer error, such asIt seems this is the case when the error is a
GraphQLHTTPResponseError
. Could we get a friendlylocalizedDescription
out of these errors?The text was updated successfully, but these errors were encountered: