@bigcommerce/checkout-sdk / RequestError
Throw this error if we are unable to make a request to the server. It wraps any server response into a JS error object.
Name | Type |
---|---|
TBody |
any |
-
↳
RequestError
• new RequestError<TBody
>(response?
, __namedParameters?
)
Name | Type |
---|---|
TBody |
any |
Name | Type |
---|---|
response? |
default <{} | TBody > |
__namedParameters? |
Object |
__namedParameters.errors? |
{ code : string ; message? : string }[] |
__namedParameters.message? |
string |
• body: {} | TBody
• errors: { code
: string
; message?
: string
}[]
• headers: Object
▪ [key: string
]: any
• name: string
• status: number
• type: string