Skip to content

Implement SignatureVerificationError #34

Description

@codebestia

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions