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
+7 -1
View File
@@ -5,6 +5,8 @@ import (
"errors"
"fmt"
"sync"
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
)
// Provider is the base shape every cover-art source implements.
@@ -112,7 +114,11 @@ var ErrProviderNotFound = errors.New("coverart: provider not registered")
// this MBID — a terminal-this-pass result. The enricher treats this
// as "try the next provider in the chain"; if all providers return
// ErrNotFound, the row settles to cover_art_source='none'.
var ErrNotFound = errors.New("coverart: 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.
var ErrNotFound = apierror.ErrNotFound
// ErrTransient indicates a temporary failure (5xx, network, timeout,
// auth issue). The enricher leaves the row's source NULL so the next