Error handling

All responses from the Consent API with a response code >=400 should be handled as an error with the format described in this section. Beside the most common consent errors as described below there is also a list of common error codes that should be considered for error handling.

{ 
    "error": {
        "code": string,
        "message": string
    }
}

The code property indicates the type of the error.

The message property holds detailed information about the error provided by the bank API.

Examples

HTTP 400 Bad Request
{ 
    "error": {
        "code": "CONSENT",
        "message": "A general error when using a consent that can not be specified in detail"
    }
}
HTTP 400 Bad Request
{ 
    "error": {
        "code": "CONSENT.EXPIRED",
        "message": "The consent lifetime has expired"
    }
}
HTTP 400 Bad Request
{ 
    "error": {
        "code": "CONSENT.REVOKED",
        "message": "The consent has been revoked"
    }
}
HTTP 400 Bad Request
{ 
    "error": {
        "code": "CONSENT.LIMIT_EXCEEDED",
        "message": "The daily limit of the consent usage has been exceeded"
    }
}
HTTP 400 Bad request
{ 
    "error": {
        "code": "badRequest",
        "message": "'account_id' is missing"
    }
}

A token can not be requested for a session which is not logged in or does not exists

HTTP 404 Not found
{ 
    "error": {
        "code": "notFound",
        "message": "Could not request a consent token for a session which is not logged in"
    }
}

Any unexpected error

HTTP 500 Internal Server Error
{ 
    "error": {
        "code": "internalServerError",
        "message": "Internal Server Error"
    }
}

results matching ""

    No results matching ""