Error Handling

When communicating with the bank several errors or unexpected situations can occur. Among other scenarios the consumer could be blocked from accessing his or her bank account or the bank could be having technical difficulties. Therefore the following error categories have been defined:

  • USER
    • an error caused by the consumer happened
  • USER.ABORTED
    • consumer aborted the process
  • USER.ACCESS_DENIED
    • access was denied
  • USER.ACCESS_DENIED.CREDENTIALS
    • access was denied, because the consumer provided incorrect credentials
  • USER.ACCESS_DENIED.BLOCKED
    • access was denied, because the consumer's account is blocked by the bank
  • USER.CONFIGURATION
    • the consumer has to manually log into her/his account, because the bank expects some kind of configuration
  • USER.CONFIGURATION.CONFIRM_INFOPAGE
    • the consumer has to manually log into her/his account and confirm that she/he has read an information message
  • USER.CONFIGURATION.ACCOUNT
    • the consumer has to manually log into her/his account and perform configurations related to her/his account
  • USER.CONFIGURATION.AUTHENTICATION_METHOD
    • the consumer has to manually log into her/his account and perform configurations related to authentication methods
  • USER.SESSION
    • an error occurred that is related to the consumer's session
  • USER.SESSION.TIMEOUT
    • the consumer took too long to proceed in the session
  • USER.SESSION.DUPLICATE
    • the consumer has logged into her/his bank account on a different device or browser window and thus blocks Open banking. by Klarna from accessing the account
  • USER.TRANSFER_DENIED
    • the transfer was denied, because of unspecified reasons related to the consumer
  • USER.TRANSFER_DENIED.INSUFFICIENT_FUNDS
    • the transfer was denied, because the consumer did not have sufficient funds
  • USER.TRANSFER_DENIED.TRANSFER_TYPE_NOT_POSSIBLE
    • the transfer was denied, because the type of transfer is not possible
  • BANK
    • an error caused by the bank happened
  • BANK.TRANSFER_DENIED
    • the transfer was denied by the bank
  • BANK.TRANSFER_DENIED.DUPLICATE
    • the transfer was denied, because it duplicates a recent transfer
  • BANK.TRANSFER_DENIED.TO_ACCOUNT_BLOCKED
    • the transfer was denied, because the bank prevents sending money to the recipient's account.
  • BANK.TECHNICAL
    • a technical error caused by the bank happened
  • BANK.API_TIMEOUT
    • the bank took too long to respond
  • TECHNICAL
    • a technical error happened
  • NOT_SUPPORTED
    • the requested action is not supported
  • NOT_SUPPORTED.SEVERAL_ACCESSORS
    • the requested action is not supported, because a transfer would have to be confirmed by a second accessor of the account
  • NOT_SUPPORTED.TRANSACTIONS_DATE_RANGE
    • the requested date range is not supported for this bank. For some banks, only transactions from the last 90 days may be fetched.
  • NOT_SUPPORTED.BUSINESS_ACCOUNT
    • the requested action is not supported, because the consumer's account is a business account
  • NOT_SUPPORTED.ACCOUNTS_NOT_APPLICABLE
    • the requested action is not supported, because there are no applicable accounts to execute this action
  • NOT_SUPPORTED.AUTHENTICATION_METHOD
    • the requested action is not supported, because of an unsupported authentication method
  • NOT_SUPPORTED.AUTHENTICATION_METHOD.ON_MOBILE_DEVICE
    • the requested action is not supported, because the authentication method is not allowed for the mobile device the consumer is using
  • MAINTENANCE
    • one or more of the services involved is undergoing maintenance
  • MAINTENANCE.BANK
    • the bank's service is undergoing maintenance
  • MAINTENANCE.BANK.ACCOUNTS
    • the bank's service is undergoing maintenance that affects the consumer's account
  • MAINTENANCE.BANK.TRANSFER
    • the bank's service is undergoing maintenance that affects doing transfers
  • MAINTENANCE.XS2A
    • Open banking. by Klarna is undergoing maintenance
  • CONSENT
    • a general error when using a consent that can not be specified in detail
  • CONSENT.EXPIRED
    • the consent lifetime has expired
  • CONSENT.REVOKED
    • the consent has been revoked
  • CONSENT.LIMIT_EXCEEDED
    • the daily limit of the consent usage has been exceeded

The format for error categories is "CATEGORY(.SUBCATEGORY(.SUBSUBCATEGORY(..arbitrarily nested..))) with anything but "CATEGORY" being optional. Using these categories the error is described as precise as possible. It's best practice to implement at least the CATEGORY to have a fallback error handling when new SUBCATEGORIES are introduced Error categories in the responses of the endpoints for the XS2A App are reduced to the top-level category for TECHNICAL, NOT_SUPPORTED and MAINTENANCE.

Timeouts

There are currently three different types of timeouts which are present in the XS2A-API as well as in the Auth API:

  • Request timeout:
    • The XS2A-API has an internal timeout of 130 seconds for each request. Requests reaching the timeout will return a BANK.API_TIMEOUT error code (see reference above).
  • XS2A Session timeout:
    • Sessions from the XS2A-API time out after 30 minutes of inactivity.
    • Once the 30 minutes have passed, the session can not be interacted with anymore, meaning all data (such as flow results) has to be fetched before the timeout.
  • Bank Session timeout:
    • The connection to the bank times out after 5 minutes of inactivity. This will return a USER.SESSION.TIMEOUT error code (see reference above).
    • It is not possible to do further actions once the bank session has timed out, however, data (such as flow results) can still be fetched.

results matching ""

    No results matching ""