Closed psolymos closed 1 year ago
As described in #1 we can add try/catch mechanism to distinguish client and server errors.
The main differences:
The PR adds mariobox::http_error() as a drop in replacement for stop() that contains the message and the intended status code.
mariobox::http_error()
stop()
mariobox::mario_try() wraps the internal function and modifies the response object based on the class of the condition object when an error happened.
mariobox::mario_try()
Thanks a lot for the PR ! Sorry it was left on hold for so long. We had very little bandwidth to work on the project.
As described in #1 we can add try/catch mechanism to distinguish client and server errors.
The main differences:
The PR adds
mariobox::http_error()
as a drop in replacement forstop()
that contains the message and the intended status code.mariobox::mario_try()
wraps the internal function and modifies the response object based on the class of the condition object when an error happened.