-
Notifications
You must be signed in to change notification settings - Fork 267
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
throw
with body in rhai map_response fails
#3069
Labels
Comments
also: the example in the docs is wrong. I think @lennyburdette must have fixed that when he copied the example.
|
garypen
changed the title
May 10, 2023
throw
with body in rhai map_request failsthrow
with body in rhai map_response fails
6 tasks
garypen
added a commit
that referenced
this issue
May 15, 2023
In #2677 we added support for throwing graphql errors from rhai. Support was added for requests. This extends the mechanism to include responses. fixes: #3069 <!-- start metadata --> **Checklist** Complete the checklist (and note appropriate exceptions) before a final PR is raised. - [x] Changes are compatible[^1] - [x] Documentation[^2] completed - [x] Performance impact assessed and acceptable - Tests added and passing[^3] - [ ] Unit Tests - [ ] Integration Tests - [ ] Manual Tests **Exceptions** *Note any exceptions here* **Notes** [^1]. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. [^2]. Configuration is an important part of many changes. Where applicable please try to document configuration examples. [^3]. Tick whichever testing boxes are applicable. If you are adding Manual Tests: - please document the manual testing (extensively) in the Exceptions. - please raise a separate issue to automate the test and label it (or ask for it to be labeled) as `manual test`
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version 1.18.0
This works (copied from the docs).
The result (which has the correct 403 status code):
This does not:
The result has the correct 403 status code but the response body is
Throwing with just a message in
map_response
works correctly:The text was updated successfully, but these errors were encountered: