
devin-ai-integration[bot]andmorgan@cal.com
a542ba486c
feat: add graceful webhook secret validation to billing controller (#22034)
* feat: add graceful webhook secret validation to billing controller
- Wrap Stripe constructEventAsync in try-catch block
- Add proper error logging for failed webhook signature validation
- Return appropriate error responses for invalid webhook secrets
- Follow existing webhook handler patterns from payments module
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* refactor: use specific Stripe error type for webhook signature validation
- Import Stripe types to access StripeSignatureVerificationError
- Check for specific Stripe signature verification error type
- Throw BadRequestException for invalid webhook signatures
- Maintain generic error handling for other webhook processing errors
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* refactor: throw BadRequestException for missing webhook signature and secret
- Use BadRequestException instead of generic Error for missing stripe-signature header
- Use BadRequestException instead of generic Error for missing webhook secret configuration
- Consistent error handling with appropriate HTTP status codes
Co-Authored-By: morgan@cal.com <morgan@cal.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: morgan@cal.com <morgan@cal.com>
2025-06-25 20:39:46 +00:00
..
2025-06-25 20:39:46 +00:00
2025-05-12 08:49:35 +00:00
2025-06-25 15:59:03 -03:00