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

Rhai Scripting - how to get subgraph response code #5158

Open
flovilmart opened this issue May 13, 2024 · 2 comments
Open

Rhai Scripting - how to get subgraph response code #5158

flovilmart opened this issue May 13, 2024 · 2 comments

Comments

@flovilmart
Copy link

Hey team!
We wish to catch 401 errors using a fn subgraph_service(service, subgraph) map_response handle however the response object does not expose status or status_code, and we're left unpacking the generated errors code and checking for SUBREQUEST_HTTP_ERROR.

Describe alternatives you've considered

We're checking for the presence of in response.body.errors[].message 401 and in response.body.errors[].extensions.code SUBREQUEST_HTTP_ERROR.

@bnjjj
Copy link
Contributor

bnjjj commented May 14, 2024

It will be fixed by #5045

@bnjjj bnjjj self-assigned this May 14, 2024
@flovilmart
Copy link
Author

Thanks @bnjjj amazingly fast turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants