Códigos de errores en las APIs

Errores en Prometeo API

Los errores en las API de Prometeo están organizados por APIs, y dentro de estas, en secciones y flujos. Esto se puede apreciar en la conformación de los códigos de error, donde el primer caracter es una letra que indica la API a la que pertenece ese error, el segundo carácter se refiere a la sección o flujo donde se produjo, y los restantes son números enteros incrementales.

📘

Los errores se agrupan en las siguientes series de APIs:

  • CXXXX - Comunes a todas las APIs
  • BXXXX - API Bancaria
  • FXXXX - API Fiscal
  • IXXXX - API Identidad
  • VXXXX - API Validación

Los errores se retornan como objetos JSON con la siguiente estructura:

Atributo Tipo de dato Descripción Ejemplo
status str El estado de la respuesta. Hay 2 estados posibles: success y error. "status": "error"
code str El código del error retornado. "code": "B1001"
type str Tipo de error. "type": "wrong_credentials"
message str Mensaje de error. "message": "Credentials error"
description [str, list, dict] Campo opcional para describir el error con más detalles. Si está presente, es de alguno de los 3 tipos de datos especificados. "description": "Password can only contain digits"

BXXXX - Errores en la API Bancaria

A continuación describimos los códigos de error diseñados para la API Bancaria. Los mismos están divididos de la siguiente manera:

  • B1XXX - Errores de autenticación y de sesión
  • B2XXX - Errores en el flujo de cuentas
  • B3XXX - Errores en el flujo de tarjetas
  • B4XXX - Errores en el flujo de transferencias

B1XXX - Errores de autenticación y de sesión


NameDescriptionExample
B1001Credentials Exception - Credentials error(1)
B1002Token Exception - Token error(2)
B1003Missing Token Exception - Token not sent(3)
B1004Interactive Answer Exception - Interactive response(4)
B1005Missing Interactive Answer Exception - Interactive response not sent(5)
B1006Provider Session Expired Exception - Session expired at provider(6)
B1007Provider Login Exception - Provider login failed(7)
B1008Provider Change Password Exception - You have to change the password at the provider(8)
B1009Logout Exception - Failed to log out(9)
B1010Client Selected Exception - Selected client does not exist(10)
B1011User Blocked Exception - User account blocked(11)

(1) - CredentialsException

{"status": "error", "code": "B1001", "type": "wrong_credentials", "message": "Credentials error"}

(2) - TokenException

{"status": "error", "code": "B1002", "type": "wrong_token", "message": "Token error"}

(3) - MissingTokenException

{"status": "error", "code": "B1003", "type": "missing_token", "message": "Token not sent"}

(4) - InteractiveAnswerException

{"status": "success", "code": "B1004", "type": "interaction_required", "message": "Interactive response"}

(5) - MissingInteractiveAnswerException

{"status": "error", "code": "B1005", "type": "missing_interactive_answer", "message": "Interactive response not sent"}

(6) - ProviderSessionExpiredException**

{"status": "error", "code": "B1006", "type": "provider_session_expired", "message": "Session expired at provider"}

(7) - ProviderLoginException

{"status": "error", "code": "B1007", "type": "provider_login_error", "message": "Provider login failed"}

(8) - ProviderChangePasswordException

{"status": "error", "code": "B1008", "type": "provider_change_password", "message": "You have to change the password at the provider"}

(9) - LogoutException

{"status": "error", "code": "B1009", "type": "logout_error", "message": "Failed to log out"}

(10) - ClientSelectedException

{"status": "error", "code": "B1010", "type": "wrong_client", "message": "Selected client does not exist"}

(11) - UserBlockedException

{"status": "error", "code": "B1011", "type": "user_blocked", "message": "User account blocked"}


B2XXX - Errores en el flujo de cuentas


NameDescriptionExample
B2001Listing Accounts Exception - Error listing accounts(1)
B2002Movements Account Query Exception - Error querying account movements(2)
B2003Account Number Exception - Account number not available for this customer(3)
B2004AccountCurrencyException - Currency not supported by the account(4)
B2005Account Movements Date Exception - Wrong date(5)

(1) - ListingAccountsException

{"status": "error", "code": "B2001", "type": "listing_accounts_error", "message": "Error listing accounts"}

(2) - MovementsAccountQueryException

{"status": "error", "code": "B2002", "type": "movements_query_error", "message": "Error querying account movements"}

(3) - AccountNumberException

{"status": "error", "code": "B2003", "type": "wrong_account_number", "message": "Account number not available for this customer"}

(4) - AccountCurrencyException

{"status": "error", "code": "B2004", "type": "wrong_account_currency", "message": "Currency not supported by the account"}

(5) - AccountMovementsDateException

{"status": "error", "code": "B2005", "type": "wrong_date", "message": "Wrong date"}


B3XXX - Errores en el flujo de tarjetas


NameDescriptionExample
B3001Listing Cards Exception - Error listing cards(1)
B3002Movements Card Query Exception - Error querying card movements(2)
B3003Card Number Exception - Card number not available for this customer(3)
B3004Card Currency Exception - Currency not supported by the card(4)
B3005Card Movements Date Exception - Wrong date(5)

(1) - ListingCardsException

{"status": "error", "code": "B3001", "type": "listing_cards_error", "message": "Error listing cards"}

(2) - MovementsCardQueryException

{"status": "error", "code": "B3002", "type": "movements_query_error", "message": "Error querying card movements"}

(3) - CardNumberException

{"status": "error", "code": "B3003", "type": "wrong_card_number", "message": "Card number not available for this customer"}

(4) - CardCurrencyException

{"status": "error", "code": "B3004", "type": "wrong_card_currency", "message": "Currency not supported by the card"}

(5) - CardMovementsDateException

{"status": "error", "code": "B3005", "type": "wrong_date", "message": "Wrong date"}


B4XXX - Errores en el flujo de transferencias


NameDescriptionExample
B4001Enroll Account Exception - Error enrolling account(1)
B4002Destination Institution Exception - Destination institution not supported(2)
B4003Account Number NonExistent Exception - Account number does not exist(3)
B4004Origin Destination Same Account Exception - Same source and destination account(4)
B4005Wrong Currency Exception - Invalid currency(5)
B4006Token Required Exception - Token value required(6)
B4007Token InvalidException - Invalid token value(7)
B4008RequestId NonExistent Exception - There is no request with that ID(8)
B4009Enroll Rejected Exception - Enrollment rejected(9)
B4010Insufficient Balance Exception - Insufficient balance(10)
B4011Currency UnsupportedAccount Exception - Currency not supported by the account(11)
B4012Transfer Exception - Transfer carry out error(12)
B4013Transfer Rejected Exception - Transfer rejected(13)
B4014Destination Account Exception - Invalid Destination Account(14)
B4015Origin Account Exception - Invalid Origin Account(15)
B4016Token Not Active Exception - Token not active(16)

(1) - EnrollAccountException

{"status": "error", "code": "B4001", "type": "account_enroll_error", "message": "Error enrolling account"}

(2) - DestinationInstitutionException

{"status": "error", "code": "B4002", "type": "destination_institution_error", "message": "Destination institution not supported"}

(3) - AccountNumberNonExistentException

{"status": "error", "code": "B4003", "type": "account_number_nonexistent", "message": "Account number does not exist"}

(4) - OriginDestinationSameAccountException

{"status": "error", "code": "B4004", "type": "same_origin_destiny_account", "message": "Same source and destination account"}

(5) - WrongCurrencyException

{"status": "error", "code": "B4005", "type": "wrong_currency", "message": "Invalid currency"}

(6) - TokenRequiredException

{"status": "success", "code": "B4006", "type": "token_required", "message": "Token value required"}

(7) - TokenInvalidException

{"status": "error", "code": "B4007", "type": "invalid_token", "message": "Invalid token value"}

(8) - RequestIdNonExistentException

{"status": "error", "code": "B4008", "type": "request_id_nonexistent", "message": "There is no request with that ID"}

(9) - EnrollRejectedException

{"status": "error", "code": "B4009", "type": "enrollment_rejected", "message": "Enrollment rejected"}

(10) - InsufficientBalanceException

{"status": "error", "code": "B4010", "type": "insufficient_balance", "message": "Insufficient balance"}

(11) - CurrencyUnsupportedAccountException

{"status": "error", "code": "B4011", "type": "unsupported_currency", "message": "Currency not supported by the account"}

(12) - TransferException

{"status": "error", "code": "B4012", "type": "transfer_error", "message": "Transfer carry out error"}

(13) - TransferRejectedException

{"status": "error", "code": "B4013", "type": "transfer_rejected", "message": "Transfer rejected"}

(14) - DestinationAccountException

{"status": "error", "code": "B4014", "type": "destination_account_error", "message": "Invalid destination account"}

(15) - OriginAccountException

{"status": "error", "code": "B4015", "type": "origin_account_error", "message": "Invalid origin account"}

(16) - TokenNotActiveException

{"status": "error", "code": "B4016", "type": "token_not_active", "message": "2FA Token not active for transfers"}