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 would like to add custom JSON properties to error response besides message, path, locations. I found that I can use IResolverContext.ReportError(string errorMessage) method to add error message. Cannot find how to add extra properties. Is there a way to report error via IQueryError from resolver or #317 is the way to go?
It seems that QueryError class has everything what is needed in terms of representing error. But how to assign it to response without throwing exception?
This works
thrownewQueryException(newQueryError("Email and password credentials not recognised",newErrorProperty("code","INVALID_IDENTITY_CREDENTIALS")));
However it would be nice to add only extensions and message as part of error response for current resolver without throwing exception.
The text was updated successfully, but these errors were encountered:
I will move this one to the next feature version since I have to move the query type to the type system. We had some feature request in the error area that will be implemented with version 0.7.0 so it is a good fit for this version.
We are currently planing to release 0.7.0 ad the end of December.
I would like to add custom JSON properties to error response besides
message
,path
,locations
. I found that I can useIResolverContext.ReportError(string errorMessage)
method to add error message. Cannot find how to add extra properties. Is there a way to report error viaIQueryError
from resolver or #317 is the way to go?It seems that
QueryError
class has everything what is needed in terms of representing error. But how to assign it to response without throwing exception?This works
However it would be nice to add only extensions and message as part of error response for current resolver without throwing exception.
The text was updated successfully, but these errors were encountered: