Summary
On DB failure the handler maps the error to a generic 500 via map_err(|_| ...), discarding the cause, unlike the AppError path which logs.
Location
src/api/mod.rs:145-152 vs src/api/payments.rs:45-54 (From<anyhow::Error> logs)
Details & impact
Provisioning failures are undiagnosable from logs.
Suggested fix
Log the error (reuse AppError) before returning 500.
Acceptance criteria
- Provisioning failures are logged with context.
Summary
On DB failure the handler maps the error to a generic 500 via
map_err(|_| ...), discarding the cause, unlike theAppErrorpath which logs.Location
src/api/mod.rs:145-152vssrc/api/payments.rs:45-54(From<anyhow::Error>logs)Details & impact
Provisioning failures are undiagnosable from logs.
Suggested fix
Log the error (reuse
AppError) before returning 500.Acceptance criteria