Closed RobertoPrevato closed 1 year ago
Custom HTTPException currently support specific exception handlers only by their HTTP status code. It is best supporting specific exception handlers by type, and give them precedence.
That is, in baseapp.pyx:
cdef object get_http_exception_handler(self, HTTPException http_exception): try: return self.exceptions_handlers[type(http_exception)] except KeyError: return self.exceptions_handlers.get(http_exception.status, common_http_exception_handler)
Custom HTTPException currently support specific exception handlers only by their HTTP status code. It is best supporting specific exception handlers by type, and give them precedence.
That is, in baseapp.pyx: