Follow-up from PR #39 review (S0). The store.Store read methods and AddAuditEvent are error-free, so the Postgres backend must panic on query errors (a transient DB blip becomes a per-request panic recovered only by net/http, with no structured error to the client and no app-level logging). PR #39 mitigates with a recover middleware; the correct shape is for the interface to return error so Connect handlers map DB failures to CodeInternal and failures are observable.
Scope: change store.Store read methods + AddAuditEvent to return error, update both backends (memory returns nil) and all callers (fleet handlers). Cross-cutting; do as its own slice.
Part of #24.
Follow-up from PR #39 review (S0). The
store.Storeread methods andAddAuditEventare error-free, so the Postgres backend must panic on query errors (a transient DB blip becomes a per-request panic recovered only by net/http, with no structured error to the client and no app-level logging). PR #39 mitigates with a recover middleware; the correct shape is for the interface to returnerrorso Connect handlers map DB failures toCodeInternaland failures are observable.Scope: change
store.Storeread methods +AddAuditEventto returnerror, update both backends (memory returns nil) and all callers (fleet handlers). Cross-cutting; do as its own slice.Part of #24.