refactor(server): final writeErr migration + ErrNotFound aliases (T3c)

This commit is contained in:
2026-05-07 21:19:35 -04:00
parent 91f4f5c18a
commit 754a7955cc
14 changed files with 182 additions and 147 deletions
+10 -2
View File
@@ -1,6 +1,10 @@
package lidarr
import "errors"
import (
"errors"
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
)
// Sentinel errors. Callers branch on these via errors.Is, not on
// HTTP status codes — the client maps codes to errors.
@@ -15,5 +19,9 @@ var (
// Lidarr's monitored set. Distinguished from network/auth errors so admin
// handlers can surface it as `lidarr_album_lookup_failed` (502) instead
// of `lidarr_unreachable` (503).
ErrNotFound = errors.New("lidarr: not found")
//
// Aliased to apierror.ErrNotFound so handler error mapping (errors.Is
// against the shared sentinel) and existing per-package callsites both
// resolve to the same pointer.
ErrNotFound = apierror.ErrNotFound
)