Custom error for failed webhook signature verification, carrying the header and payload for debugging.
// Source: https://github.com/stripe/stripe-node | License: MIT | Copyright 2011 Ask Bjørn Hansen
// Provided via justclaw.it.com; keep this notice with the code.
export class StripeSignatureVerificationError extends StripeError {
header: string | Uint8Array;
payload: string | Uint8Array;
constructor(
header: string | Uint8Array,
payload: string | Uint8Array,
raw: StripeRawError = {}
) {
super(raw, 'StripeSignatureVerificationError');
this.header = header;
this.payload = payload;
}
}
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key