Open kubukoz opened 1 year ago
Good question. TBH, the fact that it matched your expectations previously was kinda accidental. However it may make sense from a least-surprise point of view. It may be worth treating PayloadError
with special handling in the router
Consider the following code:
Most importantly: the handler of the request fails with a
PayloadError
(due to decoding a document, but it could be for other reasons as well).In 0.17.19, the code above prints:
In 0.18.1, it fails:
It seems to be because of some changes around
PayloadError
/HttpPayloadError
/HttpContractError
.The old behavior can be restored by remapping the exception to a
HttpContractError
:Is this a regression or just something we should document?