3d811988
service: wrap the merge and reject failures with culpa
Three sites, all of them the outermost wrap on an error that becomes a 500: the merge path's non-staleness arm, the reject path's default arm, and the merged-but-the-row-did-not case, whose remedy now rides on the error as a hint instead of sitting in a sentence one wrap away from being buried. Outermost is the whole criterion. scribe.Err type-asserts the error it is handed for slog.LogValuer rather than searching the chain, so a culpa error with an fmt.Errorf above it logs as a plain string and the stacktrace is lost — which is also why the sentinel arms stay fmt.Errorf: they carry no cause worth a stack, and their text is what a 404 or 409 shows a viewer. errors.Is and errors.As traverse culpa's wrap, so the sentinel mapping in the surfaces is unchanged.
Eugene Blikh <bigbes@gmail.com> — 2026-08-08 19:56:58 UTC
Commit 3d811988f9960cf9057e09f30b59ceb71a7623c2 —
view raw patch
Parent(s):
643fa0b5
| File | Status | + | − |
|---|---|---|---|
go.sum
|
M | -2 | |
service/merge.go
|
M | +23 | -4 |