Error Handling
Platform vs Provider Failures
Overview
To distinguish between Moneyhub platform errors and downstream bank/provider connectivity failures that result in HTTP 5xx status codes, we've implemented a granular error-handling mechanism.
Identification
Errors containing "ASPSP" in the error description indicate a connectivity or service issue reported by the bank or financial provider, rather than an internal platform issue.
Error Types
There are two possible downstream provider error scenarios:
- Payment Submission Error - Issues occurring during payment submission
- Payment Consent Creation Error - Issues occurring during consent creation
Error Response Structure
When a downstream provider error occurs, the response will contain:
HTTP Response
{
"statusCode": 502,
"statusMessage": "Bad Gateway",
"code": "ERR_NON_2XX_3XX_RESPONSE",
"error": "BadGateway",
"error_description": "ASPSP client error: payment consent creation"
}Raw Response Body
{
"response": {
"body": {
"code": "BadGateway",
"message": "ASPSP client error: payment consent creation"
}
}
}Key Indicators
statusCode: 502- Bad Gateway statuserror_descriptioncontaining"ASPSP"- Confirms downstream provider issue- Specific operation mentioned (e.g.,
"payment consent creation"or"payment submission") - Identifies where the failure occurred
Examples
Payment Consent Creation Error
{
"error": "BadGateway",
"error_description": "ASPSP client error: payment consent creation"
}Payment Submission Error
{
"error": "BadGateway",
"error_description": "ASPSP client error: payment submission"
}Updated about 1 hour ago
