@agorio/sdk • Docs
Class: AcpApiError
Extends
Error
Constructors
new AcpApiError()
new AcpApiError(
message,statusCode,responseBody,error?):AcpApiError
Parameters
• message: string
• statusCode: number
• responseBody: string
• error?: AcpErrorBody
Returns
Overrides
Error.constructor
Defined in
src/client/acp-client.ts:222
Properties
cause?
optionalcause:unknown
Inherited from
Error.cause
Defined in
docs/node_modules/typescript/lib/lib.es2022.error.d.ts:24
error?
readonlyoptionalerror:AcpErrorBody
Parsed structured error body, when the merchant returned the ACP error shape.
Defined in
src/client/acp-client.ts:220
message
message:
string
Inherited from
Error.message
Defined in
docs/node_modules/typescript/lib/lib.es5.d.ts:1077
name
name:
string
Inherited from
Error.name
Defined in
docs/node_modules/typescript/lib/lib.es5.d.ts:1076
responseBody
readonlyresponseBody:string
Defined in
src/client/acp-client.ts:225
stack?
optionalstack:string
Inherited from
Error.stack
Defined in
docs/node_modules/typescript/lib/lib.es5.d.ts:1078
statusCode
readonlystatusCode:number
Defined in
src/client/acp-client.ts:224
Accessors
code
Get Signature
get code():
undefined|string
Implementation-defined error code, if present (e.g. idempotency_conflict).
Returns
undefined | string
Defined in
src/client/acp-client.ts:239
errorType
Get Signature
get errorType():
undefined|string
Structured error category, if present (invalid_request | processing_error | service_unavailable).
Returns
undefined | string
Defined in
src/client/acp-client.ts:234
param
Get Signature
get param():
undefined|string
JSONPath of the offending field, if the merchant provided one.
Returns
undefined | string
Defined in
src/client/acp-client.ts:244
Methods
isAuthenticationRequired()
isAuthenticationRequired():
boolean
The session needs buyer authentication (HTTP 401/403, or an auth-flavoured code).
Returns
boolean
Defined in
src/client/acp-client.ts:249
isIdempotencyConflict()
isIdempotencyConflict():
boolean
A duplicate idempotency key conflicted with an in-flight or prior request.
Returns
boolean
Defined in
src/client/acp-client.ts:259
isPaymentDeclined()
isPaymentDeclined():
boolean
Payment was declined while completing the checkout (HTTP 402).
Returns
boolean
Defined in
src/client/acp-client.ts:264