Closed jasonlaw closed 3 years ago
yes, you are right, it should show up better, just requires some integration between the two fworks; NGraphQL does not know about ClientFaultException from Vita and treats it as general exc. I am almost done with refactoring, will push new version within days, will put a fix for this and other issues there.
added facilities to support this, see ThingsGraphQLServer.cs: https://github.com/rivantsov/ngraphql/blob/master/src/TestApp/Things.GraphQL/ThingsGraphQLServer.cs#L26
it uses AggregateExc as an example - how to convert inner exceptions into errors in response. There's a unit test for this. You can do the same with ClientFaultException. Will add this to GraphQL sample in VITA later
It is working, thanks!
Hi @rivantsov ,
I have a Entity validation logic as below.
When calling from REST, I have the error formatted as below.
However, when calling from NGraphQL, I have the following error format:
Do you think it is possible to make both error format in a more consistent way, at least the message in GraphQL should be "Login with username jason.cclaw@gmail.com already exists.".