Open andre-meneses-fivestars opened 1 year ago
@andre-meneses-fivestars if you are not working on this. I would love to give a try on this.
@andre-meneses-fivestars if you are not working on this. I would love to give a try on this.
@rahuldimri I'm not looking at this. I managed to workaround in the project I'm working on...
@andre-meneses-fivestars Can you assign this to me please.
@rahuldimri @srikanthccv is there any progress on this one? This is also a big issue for us, I could pick it up if you don't mind.
Is your feature request related to a problem? In a Falcon app, if we raise an Exception of a type that is a subclass of a
falcon.HTTPError
orfalcon.HTTPStatus
it ends up being always marked as error and the trace status code set as 500 (Except if it is a 404).Describe the solution you'd like All exceptions that are subclasses of
falcon.HTTPError
orfalcon.HTTPStatus
should not always be masked with 500 status code. Additionally, status codes in the 4xx range are not server errors and should not be marked as errors, which, from what I can read in the code are not, but since everything is being set as 500, they end up being marked as errors.Describe alternatives you've considered My suggestion would be something like checking the exception to see if it is a subclass of a
falcon.HTTPError
orfalcon.HTTPStatus
and try to extract its status code from there. Only if it wasn't possible we would follow into the current path.