MCPcopy Create free account
hub / github.com/EasyIME/PIME / ErrorHandler

Class ErrorHandler

python/python3/tornado/web.py:2458–2471  ·  view source on GitHub ↗

Generates an error response with ``status_code`` for all requests.

Source from the content-addressed store, hash-verified

2456
2457
2458class ErrorHandler(RequestHandler):
2459 """Generates an error response with ``status_code`` for all requests."""
2460
2461 def initialize(self, status_code: int) -> None:
2462 self.set_status(status_code)
2463
2464 def prepare(self) -> None:
2465 raise HTTPError(self._status_code)
2466
2467 def check_xsrf_cookie(self) -> None:
2468 # POSTs to an ErrorHandler don't actually have side effects,
2469 # so we don't need to check the xsrf token. This allows POSTs
2470 # to the wrong url to return a 404 instead of 403.
2471 pass
2472
2473
2474class RedirectHandler(RequestHandler):

Callers 3

char_specs_checkerClass · 0.85
check_format_stringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected