Skip to content

different status codes from rhai#2097

Merged
garypen merged 9 commits intodevfrom
garypen/2023-rhai-status-codes
Nov 15, 2022
Merged

different status codes from rhai#2097
garypen merged 9 commits intodevfrom
garypen/2023-rhai-status-codes

Conversation

@garypen
Copy link
Contributor

@garypen garypen commented Nov 14, 2022

enhance the existing rhai error handling implementation so that specific status codes can be set.

The change is fully backwards compatible (i.e.: the existing method still works), but if a user wishes to specify the HTTP status code set in the client response, they need only throw an objectmap as per the examples in NEXT_CHANGELOG.md.

fixes: #2023

Gary Pennington added 2 commits November 14, 2022 14:04
No tests yet, to be done...
also fix the initial implementation to make sure all the tests are
passing.
@garypen garypen requested a review from a team November 14, 2022 16:24
@garypen garypen self-assigned this Nov 14, 2022
Gary Pennington added 2 commits November 14, 2022 16:26
with correct PR number
@garypen garypen requested review from BrynCooke, Geal and o0Ignition0o and removed request for a team and BrynCooke November 14, 2022 16:34
Gary Pennington added 2 commits November 15, 2022 10:19
to make clear why we don't use `process_error()` in
`run_rhai_service()`.
o0Ignition0o
o0Ignition0o approved these changes Nov 15, 2022
@garypen garypen merged commit 6300007 into dev Nov 15, 2022
@garypen garypen deleted the garypen/2023-rhai-status-codes branch November 15, 2022 11:09
@abernix abernix mentioned this pull request Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Triggering different HTTP status codes from Rhai

4 participants