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

Function writeStoreErrorR

internal/server/server.go:3127–3129  ·  view source on GitHub ↗

writeStoreErrorR answers a failed store call with the status, code and message the caller chose, unless the database was merely busy (see store.IsDBBusy), which is a retryable 503 database_busy instead. The real error is logged, and err.Error() is NEVER sent: store errors carry SQL text and SQLSTATE

(w http.ResponseWriter, r *http.Request, err error, status int, code, message string)

Source from the content-addressed store, hash-verified

3125// header-only 503 and no error log: there is nobody to tell. Where no request is in scope, writeInternalError is the
3126// neutral-wording funnel.
3127func writeStoreErrorR(w http.ResponseWriter, r *http.Request, err error, status int, code, message string) {
3128 writeStoreErrorBusyAs(w, r, err, status, code, message, "")
3129}
3130
3131// writeStoreErrorBusyAs is writeStoreErrorR for the paths where the default
3132// busy wording would be untrue: a step that runs AFTER the main write

Callers 15

handleSSEMethod · 0.85
handleImportWorkspaceMethod · 0.85
handleMCPPATAuthMethod · 0.85
createAuthSessionMethod · 0.85
handleBootstrapMethod · 0.85
handleRegisterMethod · 0.85
handleLoginMethod · 0.85
handleSessionCheckMethod · 0.85

Calls 1

writeStoreErrorBusyAsFunction · 0.85

Tested by 2