Raised by Webhook.construct_event() when the HMAC-SHA256 signature in the Shade-Signature header does not match the computed signature for the payload. Should include the expected vs received values (masked) to aid debugging.
Proposed Steps:
- Define
SignatureVerificationError(ShadeError) in errors.py.
- Add
header: str (received) and a hint about what went wrong (wrong secret, tampered payload).
- Do not expose the expected signature value in the exception to avoid leaking secrets.
Acceptance Criteria:
- A mismatched signature raises
SignatureVerificationError.
- The exception message explains possible causes (wrong secret, payload modified in transit).
- The full expected HMAC is never included in the exception message.
Raised by
Webhook.construct_event()when the HMAC-SHA256 signature in theShade-Signatureheader does not match the computed signature for the payload. Should include the expected vs received values (masked) to aid debugging.Proposed Steps:
SignatureVerificationError(ShadeError)inerrors.py.header: str(received) and a hint about what went wrong (wrong secret, tampered payload).Acceptance Criteria:
SignatureVerificationError.