Throwing or passing next() an error (even HttpError) results in weird behavior:
Expected result would be no Could not resolve request thing with 404 response code, but rather 403 response code with no.
Alternatively, it could be explicitly stated in documentation what is the allowed way of using middlewares (only directly interacting with HttpRequest/HttpResponse) and no other fancy things are allowed.
Throwing or passing
next()
an error (evenHttpError
) results in weird behavior:Expected result would be no
Could not resolve request
thing with 404 response code, but rather 403 response code with no.Alternatively, it could be explicitly stated in documentation what is the allowed way of using middlewares (only directly interacting with
HttpRequest
/HttpResponse
) and no other fancy things are allowed.