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)
| 3167 | // retried import makes a second workspace). The real error is logged; its text |
| 3168 | // is never sent, only message, which the caller wrote. |
| 3169 | func 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 | |
| 3174 | func isWriteMethod(m string) bool { |
| 3175 | switch m { |
no test coverage detected