MCPcopy Index your code
hub / github.com/bugy/script-server / exception_to_code_and_message

Function exception_to_code_and_message

src/web/server.py:77–85  ·  view source on GitHub ↗
(exception)

Source from the content-addressed store, hash-verified

75
76
77def exception_to_code_and_message(exception):
78 if isinstance(exception, AccessProhibitedException):
79 return 403, str(exception)
80 if isinstance(exception, MissingArgumentException):
81 return 400, str(exception)
82 if isinstance(exception, NotFoundException):
83 return 404, str(exception)
84
85 return None, None
86
87
88class BaseRequestHandler(tornado.web.RequestHandler):

Callers 2

write_errorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected