Logs an exception. This is called by :meth:`handle_exception` if debugging is disabled and right before the handler is called. The default implementation logs the exception as error on the :attr:`logger`. .. versionadded:: 0.8
(
self,
exc_info: (tuple[type, BaseException, TracebackType] | tuple[None, None, None]),
)
| 862 | return self.finalize_request(server_error, from_error_handler=True) |
| 863 | |
| 864 | def log_exception( |
| 865 | self, |
| 866 | exc_info: (tuple[type, BaseException, TracebackType] | tuple[None, None, None]), |
| 867 | ) -> None: |
| 868 | """Logs an exception. This is called by :meth:`handle_exception` |
| 869 | if debugging is disabled and right before the handler is called. |
| 870 | The default implementation logs the exception as error on the |
| 871 | :attr:`logger`. |
| 872 | |
| 873 | .. versionadded:: 0.8 |
| 874 | """ |
| 875 | self.logger.error( |
| 876 | f"Exception on {request.path} [{request.method}]", exc_info=exc_info |
| 877 | ) |
| 878 | |
| 879 | def dispatch_request(self) -> ft.ResponseReturnValue: |
| 880 | """Does the request dispatching. Matches the URL and returns the |