Skip to content

fix: return 400 instead of 500 for validation errors#43

Merged
felippemsc merged 2 commits intomainfrom
fix/validate-error-handling
Feb 8, 2026
Merged

fix: return 400 instead of 500 for validation errors#43
felippemsc merged 2 commits intomainfrom
fix/validate-error-handling

Conversation

@felippemsc
Copy link
Contributor

@felippemsc felippemsc commented Feb 8, 2026

Summary

  • Catch exceptions from signedshot.validate_with_jwks() and return 400 with a descriptive error message instead of a 500 stack trace
  • Handles cases like old sidecars missing the attestation field and cross-issuer signature verification failures

Test plan

  • Upload a sidecar with missing attestation field — should return 400
  • Upload a sidecar from dev-api to api (or vice versa) — should return 400
  • Upload a valid sidecar+media pair — should still return 200

@felippemsc felippemsc added the deploy-rc Deploys release candidate to dev environment label Feb 8, 2026
@github-actions
Copy link

github-actions bot commented Feb 8, 2026

🚀 Release Candidate Deployed!

Version: v0.0.25-rc.43

The RC has been deployed to the dev environment. Check the /health endpoint to verify.

@felippemsc felippemsc merged commit 92ee679 into main Feb 8, 2026
5 checks passed
@felippemsc felippemsc deleted the fix/validate-error-handling branch February 8, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy-rc Deploys release candidate to dev environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant