MCPcopy
hub / github.com/nesquena/hermes-webui / bad

Function bad

api/helpers.py:35–37  ·  view source on GitHub ↗

Return a clean JSON error response.

(handler, msg, status: int=400)

Source from the content-addressed store, hash-verified

33
34
35def bad(handler, msg, status: int=400):
36 """Return a clean JSON error response."""
37 return j(handler, {'error': msg}, status=status)
38
39
40def _sanitize_error(e: Exception) -> str:

Callers 15

_handle_chat_steerFunction · 0.90
_kanban_unknown_endpointFunction · 0.90
_handle_logsFunction · 0.90
handle_getFunction · 0.90
handle_postFunction · 0.90
handle_deleteFunction · 0.90
_handle_session_exportFunction · 0.90
_handle_list_dirFunction · 0.90

Calls 1

jFunction · 0.85

Tested by

no test coverage detected