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

Function writeStoreErrorR

internal/server/server.go:3220–3222  ·  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

3218// header-only 503 and no error log: there is nobody to tell. Where no request is in scope, writeInternalError is the
3219// neutral-wording funnel.
3220func writeStoreErrorR(w http.ResponseWriter, r *http.Request, err error, status int, code, message string) {
3221 writeStoreErrorBusyAs(w, r, err, status, code, message, "")
3222}
3223
3224// writeStoreErrorBusyAs is writeStoreErrorR for the paths where the default
3225// busy wording would be untrue: a step that runs AFTER the main write

Callers 15

handleSSEMethod · 0.85
handleImportWorkspaceMethod · 0.85
handleActivateMethod · 0.85
handleRenameWorkspaceMethod · 0.85
handleMCPPATAuthMethod · 0.85
createAuthSessionMethod · 0.85
handleBootstrapMethod · 0.85
handleRegisterMethod · 0.85
handleLoginMethod · 0.85

Calls 1

writeStoreErrorBusyAsFunction · 0.85

Tested by 2