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

Function writeError

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

Source from the content-addressed store, hash-verified

3077}
3078
3079func writeError(w http.ResponseWriter, status int, code, message string) {
3080 writeJSON(w, status, map[string]interface{}{
3081 "error": map[string]string{
3082 "code": code,
3083 "message": message,
3084 },
3085 })
3086}
3087
3088// Values of details.reason on a 403, naming which gate refused (BUG-3864).
3089// Code and message are unchanged, so the web app and CLI read what they always

Callers 15

handleSetRoleParkMethod · 0.85
handleClearRoleParkMethod · 0.85
writeRateLimitResponseFunction · 0.85
handleServerIdentityMethod · 0.85
resolveBuiltinItemMethod · 0.85
handleBuiltinUpdateMethod · 0.85
handleCollabMethod · 0.85
writeCollabAccessErrorFunction · 0.85
handleImportURLMethod · 0.85
handleItemsSortOrderMethod · 0.85
handleInviteMemberMethod · 0.85
handleRemoveMemberMethod · 0.85

Calls 1

writeJSONFunction · 0.85

Tested by 1