If a request to submit an EBT Element
fails, then the returned Promise rejects with a ForageError
.
{
httpStatusCode: 400,
code: 'invalid_merchant_account',
message: 'Merchant account FNS number not valid.'
}
For a complete list of possible code and message pairs, refer to the SDK errors reference.
ForageError
A ForageError
is an object that contains the following fields:
Type | Description | |
---|---|---|
httpStatusCode | 400 401 402 403 404 429 500 502 504 | The HTTP status that the Forage API returns in response to the request. |
code | string | A short string that helps identify the cause of the error. For example, ebt_error_55 indicates that a user entered an invalid EBT Card PIN.Learn more about SDK error codes. |
message | string | A developer-facing description of the error. |
details | object | undefined | Additional details about the error, included for your convenience. * Only included for specific codes that have details, such as ebt_error_51. |
Error handling examples