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

Function writeError

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

Source from the content-addressed store, hash-verified

2984}
2985
2986func writeError(w http.ResponseWriter, status int, code, message string) {
2987 writeJSON(w, status, map[string]interface{}{
2988 "error": map[string]string{
2989 "code": code,
2990 "message": message,
2991 },
2992 })
2993}
2994
2995// Values of details.reason on a 403, naming which gate refused (BUG-3864).
2996// Code and message are unchanged, so the web app and CLI read what they always

Callers 15

writeRateLimitResponseFunction · 0.85
handleServerIdentityMethod · 0.85
resolveBuiltinItemMethod · 0.85
handleBuiltinUpdateMethod · 0.85
handleCollabMethod · 0.85
handleImportURLMethod · 0.85
handleItemsSortOrderMethod · 0.85
handleInviteMemberMethod · 0.85
handleRemoveMemberMethod · 0.85
writeMemberChangeErrorFunction · 0.85

Calls 1

writeJSONFunction · 0.85

Tested by

no test coverage detected