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

How to intercept gql http errors. #392

Open
dirindon opened this issue Sep 13, 2022 · 1 comment
Open

How to intercept gql http errors. #392

dirindon opened this issue Sep 13, 2022 · 1 comment
Assignees
Labels
Discussion enhancement New feature or request
Milestone

Comments

@dirindon
Copy link

I was looking for a way to intercept errors with https://angular.io/api/common/http/HttpInterceptor
but I failed to find any solution and wasn't able to find anything going thru source code.

This is type of errors I wish to catch core.mjs:6412 ERROR Error: Uncaught (in promise): Error: GraphQL Error (Code: 401):
and I don't believe adding error handling to each of the requests is the way to go, especially to catch simple 401.

Did anyone had similar issue or found a way to handle those errors without writing massive amounts of code to each of the queries ?

@Benz19 Benz19 added this to the v0.19.0 milestone Nov 4, 2022
@jesse-savary jesse-savary self-assigned this Nov 4, 2022
@jesse-savary jesse-savary added the enhancement New feature or request label Nov 4, 2022
@jesse-savary
Copy link
Member

@dirindon if I'm understanding correctly, you'd like some kind of top-level way to inspect network requests running through mst-gql?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants