3 ms·
AFAIK graphql does have response error codes. You should always have response error codes no matter the form of api. They are semantic info.
by nojvek 6y ago
AFAIK graphql does have response error codes. You should always have response error codes no matter the form of api. They are semantic info.
- RedShift1 6y agoGraphQL does not have response error codes. It only dictates that any response that has errors, should have an "error" field. It is not defined what this error field should contain, it can be a string or an object with a code and text, etc...
- nojvek 6y agoI could be wrong. Some of the graphql servers I have interacted with have given me useful error codes. E.g GitHub. We do have nice wrappers around the request to raise a proper named exception regardless so it doesn’t matter.