refactor(server): final writeErr migration + ErrNotFound aliases (T3c)
This commit is contained in:
@@ -25,13 +25,16 @@ import (
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/coverart"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
||||
)
|
||||
|
||||
// ErrNotFound is returned when the track id doesn't resolve. Handler
|
||||
// maps to 404 `not_found`.
|
||||
var ErrNotFound = errors.New("tracks: not found")
|
||||
// ErrNotFound is returned when the track id doesn't resolve. Aliased
|
||||
// to apierror.ErrNotFound so handlers can errors.Is against the shared
|
||||
// sentinel; existing tracks.ErrNotFound callsites still resolve to the
|
||||
// same pointer.
|
||||
var ErrNotFound = apierror.ErrNotFound
|
||||
|
||||
// LidarrUnmonitorer is the subset of *lidarr.Client RemoveTrack uses.
|
||||
// Defined as an interface so tests can stub without spinning up a Lidarr
|
||||
|
||||
Reference in New Issue
Block a user