Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for handle/format error response #2884

Open
vibhor-d11 opened this issue Sep 23, 2024 · 3 comments
Open

Support for handle/format error response #2884

vibhor-d11 opened this issue Sep 23, 2024 · 3 comments
Labels
state: inactive No current action needed/possible; issue fixed, out of scope, or superseded.

Comments

@vibhor-d11
Copy link

vibhor-d11 commented Sep 23, 2024

Is your feature request related to a problem? Please describe.
How do i handle error response? backend service may throw different error responses with different error codes, i might have to return custom formatted error response based on backend response, how do i do that?
Describe the solution you'd like
a support for custom error handler to format error and return based on requirement. Would be very beneficial if it could be provided with js support to write custom error handler

Additional context
Mostly error response sent to app via graphql may need custom error messages, status codes depending on backend response so a error handler is required to format error that is sent as response via graphql

@tusharmath
Copy link
Contributor

Can you provide an example of how a typical error response would look like vs how would you want it to be.

@vibhor-d11
Copy link
Author

like if my status code is between 500-599 , i may send a response with generic error message, also error response might be sending me some key MsgCode eg, then i may have different error response mapping on graphql side also based on this msg code etc

Copy link

Action required: Issue inactive for 30 days.
Status update or closure in 7 days.

@github-actions github-actions bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: inactive No current action needed/possible; issue fixed, out of scope, or superseded.
Projects
None yet
Development

No branches or pull requests

2 participants