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

Function writeStoreErrorNotRetryable

internal/server/server.go:3169–3172  ·  view source on GitHub ↗

writeStoreErrorNotRetryable answers a failed store call with a 500 and a caller-chosen code that must NEVER read as retryable: a busy cause is NOT mapped to 503 database_busy and no Retry-After is set, because the request already did part of its work and repeating it would duplicate that work (a ret

(w http.ResponseWriter, err error, code, message string)

Source from the content-addressed store, hash-verified

3167// retried import makes a second workspace). The real error is logged; its text
3168// is never sent, only message, which the caller wrote.
3169func writeStoreErrorNotRetryable(w http.ResponseWriter, err error, code, message string) {
3170 slog.Error("request failed after part of its work was kept; not retryable", "error", err, "code", code)
3171 writeError(w, http.StatusInternalServerError, code, message)
3172}
3173
3174func isWriteMethod(m string) bool {
3175 switch m {

Callers 1

Calls 2

writeErrorFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected