MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / writeError

Function writeError

internal/server/server.go:1810–1817  ·  view source on GitHub ↗
(w http.ResponseWriter, status int, code, message string)

Source from the content-addressed store, hash-verified

1808}
1809
1810func writeError(w http.ResponseWriter, status int, code, message string) {
1811 writeJSON(w, status, map[string]interface{}{
1812 "error": map[string]string{
1813 "code": code,
1814 "message": message,
1815 },
1816 })
1817}
1818
1819// writeInternalError logs the real error server-side and sends a generic
1820// message to the client. This prevents leaking SQL errors, file paths,

Callers 15

writeRateLimitResponseFunction · 0.85
handleCollabMethod · 0.85
handleImportURLMethod · 0.85
handleInviteMemberMethod · 0.85
handleRemoveMemberMethod · 0.85
handleCreateDocumentMethod · 0.85

Calls 1

writeJSONFunction · 0.85

Tested by

no test coverage detected