MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / write_error

Method write_error

mitmproxy/tools/web/app.py:354–358  ·  view source on GitHub ↗
(self, status_code: int, **kwargs)

Source from the content-addressed store, hash-verified

352 raise APIError(404, "Flow not found.")
353
354 def write_error(self, status_code: int, **kwargs):
355 if "exc_info" in kwargs and isinstance(kwargs["exc_info"][1], APIError):
356 self.finish(kwargs["exc_info"][1].log_message)
357 else:
358 super().write_error(status_code, **kwargs)
359
360
361class IndexHandler(RequestHandler):

Callers

nothing calls this directly

Calls 1

finishMethod · 0.45

Tested by

no test coverage detected