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
Hi,
There is currently no way to differentiate between various errors when doing a query/ mutation except from the error messages.
As error messages from the resource server are sometimes dubiety, some resource server does return error code on the extensionsfield so that the callers could identify the errors. Thus, I believe it would be very convenient if this package could provide a way to let the caller get the error's extensions value.
I am thinking something like what aws sdk does on their awserr. I would like to do something like this :
if err != nil {
if gqlErr, ok := err.(graphql.Error); ok {
// process error
// if gqlErr.Code() == ...
}
}
So im taking my chance to ask if there is any possibility that you could export the graphql.errors type and let the caller get whatever it is inside the extension? I could try to implement it if the idea sounds worth to do.
Or at least i would like to hear your opinion about handling various errors from the resource server.
Thanks !
The text was updated successfully, but these errors were encountered:
Hi,
There is currently no way to differentiate between various errors when doing a query/ mutation except from the error messages.
As error messages from the resource server are sometimes dubiety, some resource server does return error code on the extensionsfield so that the callers could identify the errors. Thus, I believe it would be very convenient if this package could provide a way to let the caller get the error's extensions value.
I am thinking something like what aws sdk does on their awserr. I would like to do something like this :
So im taking my chance to ask if there is any possibility that you could export the graphql.errors type and let the caller get whatever it is inside the extension? I could try to implement it if the idea sounds worth to do.
Or at least i would like to hear your opinion about handling various errors from the resource server.
Thanks !
The text was updated successfully, but these errors were encountered: