PesepayError
The shape of result.error. An interface, not a class — the class ships in
the CDN runtime. Narrow on code, not instanceof.
export interface PesepayError extends ErrorProperties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
code | PesepayErrorCode | The specific reason. Branch on this. |
declineCode? | string | Raw refusal reason from the processor, when one was given. |
param? | PesepayErrorParam | The option or field the error is about, when there is one. |
requestId? | string | Correlates a failure with Pesepay’s logs, from a Pesepay-Request-Id header when the response carried one. |
statusCode? | number | HTTP status, when the failure came from a response. |
type | PesepayErrorType | The broad category, such as card_error or network_error. |