fix(relay): address final PR review issues for MM-92
- Fix 1: Replace wrong sqlx error source for corrupt migration version. Use
Protocol(format!(...)) instead of RowNotFound to accurately describe the
i64-to-u32 conversion failure.
- Fix 2: Remove InvalidKeyId from CryptoError variants list in CLAUDE.md (never
implemented).
- Fix 3: Rename three test functions to match their assertions:
unsupported_algorithm_returns_422, empty_algorithm_returns_422,
missing_algorithm_field_returns_422.
- Fix 4: Add test for null algorithm field. Null deserialization returns 400
(Bad Request) from Axum's default JSON rejection, distinct from missing/invalid
enum variants (422).
- Fix 5: Add key_id context to DB insert error log for better debugging when
signing key persistence fails.
- Fix 6: Add comment explaining why Sensitive<T> has pub T field — deliberate
design choice to make raw value access visible in source for code review.
authored by
malpercio.dev
and committed by