wotpy.protocols.http.handlers.base
Base request handler for proper error reporting.
Classes
|
- class wotpy.protocols.http.handlers.base.BaseHandler(application: Application, request: HTTPServerRequest, **kwargs: Any)
Bases:
RequestHandler- write_error(status_code, **kwargs)
Override to implement custom error pages.
write_errormay call write, render, set_header, etc to produce output as usual.If this error was caused by an uncaught exception (including HTTPError), an
exc_infotriple will be available askwargs["exc_info"]. Note that this exception may not be the “current” exception for purposes of methods likesys.exc_info()ortraceback.format_exc.