Replies: 1 comment 4 replies
-
I like the idea of building out error types as a new feature enhancement. I need to do some more research on this and get back to you. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm having a multilingual setup and wonder if there is any way how to provide translation for error messages returned by GraphQL based on locale.
I need to show users error messages in appropriate locale.
For example returned error object:
even without providing translation by the server right away which is preferable, the translation could be provided by the client app, but there is no simple identifier of the error code to pair it with, like error code or simple error string "ERR_USER_ALREADY_EXISTS". I don't want to pair it with error messages as they can change in the future.
The error codes/ids would be helpful also for handling different errors on client-side differently (e.g. show different image, colors, different retry strategy etc.)
I'm also having an additional problem with this that errors live in different separate object from the query object, which also behave buggy, most importantly makes multiple queries/mutations in single request tricky. I'll create a separate ticket for this.
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions