Error Handling
This document provides a comprehensive reference for all error codes, messages, descriptions, and recommended actions for the PIPE API.
Application Response Codes
These are the core response codes used throughout the ERM system for business logic errors.
| Code | Description | Common Scenarios | Recommended Actions |
|---|---|---|---|
00 | General/Unknown Error | Currency mismatch, configuration errors, user mismatch | Review request parameters, verify configuration settings |
6 | General Transaction Failure | Database errors, processing failures | Retry the transaction, check system logs, and contact support if persistent |
11 | Invalid Amount | Amount format incorrect, negative amounts | Ensure the amount is a valid positive number with correct decimal places |
12 | Invalid Transaction | Transaction validation failed | Verify all transaction fields are correct and complete |
25 | Transaction Not Found | Referenced transaction doesn't exist | Verify the transaction ID, and check if the transaction was created |
30 | Bad Request | Malformed request body, missing fields | Review API documentation, validate request payload |
31 | Route Configuration Error for Issuer Institution | Sender endpoint undefined, local payment confirmation undefined | Configure the sender institution's routing properly in the system |
39 | Invalid Account | Account validation failed, account not recognized | Verify account details, ensure account exists and is active |
40 | Sender Invalid | Sender account/details invalid | Check sender account information, verify sender is authorized |
51 | Insufficient Funds | Liquidity shortage, balance insufficient | Add funds, wait for liquidity replenishment, or reduce transaction amount |
64 | Authentication Token Invalid | Token expired, signature invalid, public key errors | Refresh the authentication token, verify the signature, and check the public key configuration |
80 | Account Name Mismatch | Sender/receiver account details don't match | Verify account names match registered accounts exactly |
91 | Remote Service Unreachable | Liquidity gateway not found, timeout | Check network connectivity, verify gateway configuration, retry later |
92 | Routing Configuration Error for Receiving Institution | Receiver gateway not found, endpoint undefined | Configure the receiving institution's routing properly |
93 | Gateway Configuration Error | Missing liquidity provider ID, exchange rate not set | Configure the gateway with the required parameters (liquidity provider, exchange rate) |
96 | System Malfunction | Internal system error | Contact the system administrator, check system health |
Error Types
The ERM system uses typed errors to categorize different failure modes.
1. AppErrorFormat
HTTP Status: 400 Bad Request
A structured application error with code, details, and description.
{
"error": "sender-gateway-not-found",
"code": "92",
"description": "Issue/Error with routing configuration for the receiving institution"
}2. ErrorMissingParameter
HTTP Status: 400 Bad Request
Occurs when a required parameter is not provided.
{
"error": "error-missing-parameter",
"data": "parameter_name",
"message": "Missing Required Parameter",
"code": "optional_code"
}Possible Actions:
- Check API documentation for required fields
- Ensure all mandatory parameters are included in the request
3. ErrorNotFound
HTTP Status: 404 Not Found
Resource not found in the system.
{
"error": "error-not-found",
"data": "resource_id",
"message": "Not Found"
}Possible Actions:
- Verify the resource ID is correct
- Check if the resource was created
- Ensure you have permission to access the resource
4. ErrorInvalidJSON
HTTP Status: 400 Bad Request
Request body is not valid JSON.
{
"error": "error-invalid-json",
"data": null,
"message": "The JSON data you submitted is not well formed JSON!"
}Possible Actions:
- Validate JSON syntax before sending
- Check for missing brackets, quotes, or commas
- Use a JSON validator tool
5. ErrorInvalidIdentifierFormat
HTTP Status: 400 Bad Request
Identifier contains invalid characters.
{
"error": "error-invalid-identifier-format",
"data": "parameter_name",
"message": "Invalid Identifier Format. Only letters a-z, digits 0-9, and characters [_-.@#&+%] are valid."
}Possible Actions:
- Remove special characters not in the allowed set
- Use URL encoding if necessary
- Validate identifiers before submission
6. ErrorInvalidEmailFormat
HTTP Status: 400 Bad Request
Email address is not in valid format.
{
"error": "error-invalid-email-format",
"data": "email_parameter",
"message": "error-invalid-email-format"
}Possible Actions:
- Verify email follows standard format ([email protected])
- Check for typos in the email address
7. ErrorInvalidNumber
HTTP Status: 400 Bad Request
Numeric field contains invalid value.
{
"error": "error-invalid-number",
"data": "parameter_name",
"message": "error-invalid-number"
}Possible Actions:
- Ensure the value is numeric
- Check decimal separator (use period, not comma)
- Verify the number is within an acceptable range
8. ErrorWrongFormat
HTTP Status: 400 Bad Request
Data format doesn't match the expected format.
{
"error": "error-wrong-format",
"data": "parameter_name",
"message": "Wrong Format: details"
}Possible Actions:
- Review API documentation for the expected format
- Check date formats (ISO 8601 recommended)
- Verify currency codes are ISO 4217 compliant
9. ErrorIncompleteData
HTTP Status: 422 Unprocessable Entity
The request is valid, but the data is incomplete for processing.
{
"error": "error-incomplete-data",
"details": "specific_details",
"extra": {}
}Possible Actions:
- Review the
detailsfield for specific missing information - Complete all required data fields
- Check for dependent field requirements
10. ErrorConflictOperationAlreadyPerformed
HTTP Status: 409 Conflict
Attempting to perform an operation that was already completed.
{
"error": "error-conflict-operation-already-performed",
"data": "operation_id",
"message": "error-conflict-operation-already-performed; status:id"
}Possible Actions:
- Check the current status of the resource
- Do not retry idempotent operations that succeeded
- Use GET to retrieve the current state
11. ErrorEncryption
HTTP Status: 500 Internal Server Error
Encryption/decryption operation failed.
{
"error": "error-encryption",
"data": "",
"message": "error-encryption: extra_info"
}Possible Actions:
- Verify encryption keys are configured correctly
- Check that the encryption algorithm matches the expected
- Contact the system administrator
HTTP Status Codes
| Status Code | Meaning | When Used |
|---|---|---|
| 200 | OK | Successful request |
| 201 | Created | Resource successfully created |
| 400 | Bad Request | Invalid request format, missing parameters, validation errors |
| 401 | Unauthorized | Missing or invalid authentication token |
| 404 | Not Found | Resource does not exist |
| 409 | Conflict | Operation already performed, duplicate resource |
| 422 | Unprocessable Entity | Valid request but semantic errors (incomplete data, signature required) |
| 500 | Internal Server Error | Server-side errors (encryption, system malfunction) |
| 501 | Not Implemented | Feature not available |
Detailed Error Messages
Payment Processing Errors
| Error Detail | Code | Description | Action |
|---|---|---|---|
sender-gateway-not-found | 92 | Sender payment gateway doesn't exist | Verify gateway ID, check gateway registration |
receiver-gateway-not-found | 92 | The receiver payment gateway doesn't exist | Verify gateway ID, check gateway registration |
sender-liquidity-gateway-not-found | 91 | Sender's liquidity provider is unreachable | Check liquidity provider configuration |
receiver-liquidity-gateway-not-found | 91 | The receiver's liquidity provider is unreachable | Check liquidity provider configuration |
sender-currencies-mismatch | 00 | Currency doesn't match sender configuration | Verify currency codes match the gateway setup |
receiver-currencies-mismatch | 00 | Currency doesn't match receiver configuration | Verify currency codes match the gateway setup |
not-enough-liquidity-at-this-moment | 51 | Insufficient liquidity for transfer | Wait for liquidity, reduce the amount, or fund the account |
not-enough-pre-funding-liquidity-at-this-moment | 51 | Pre-funded balance insufficient | Add pre-funding to the gateway account |
not-enough-terminating-liquidity-at-this-moment | 51 | The terminating gateway lacks funds | Fund terminating gateway |
no-terminating-liquidity-at-this-moment | 51 | No liquidity available at the terminating gateway | Configure liquidity or wait |
no-processing-gateway-to-terminate-transaction | 6 | No gateway available to complete the transaction | Check the gateway routing configuration |
Account Verification Errors
| Error Detail | Code | Description | Action |
|---|---|---|---|
sender-account-verification-endpoint-undefined | 31 | Sender verification URL not configured | Configure verification endpoint |
receiver-account-verification-endpoint-undefined | 92 | Receiver verification URL not configured | Configure verification endpoint |
sender-account-verification-bearer-token-undefined | 64 | Missing auth token for sender verification | Configure bearer token |
receiver-account-verification-bearer-token-undefined | 64 | Missing auth token for receiver verification | Configure bearer token |
error-validating-sender-account | 39 | Sender account validation failed | Verify account details |
error-validating-receiver-account | 39 | Receiver account validation failed | Verify account details |
sender-not-recognized | 39 | Sender account not found in the system | Register or verify sender account |
receiver-not-recognized | 39 | The receiver account was not found in the system | Register or verify the receiver account |
invalid-post-sender-account-verification-endpoint | 92 | POST verification endpoint invalid | Check endpoint URL format |
invalid-get-sender-account-verification-endpoint | 92 | GET verification endpoint is invalid | Check endpoint URL format |
Authentication & Signature Errors
| Error Detail | Code | Description | Action |
|---|---|---|---|
error-decoding-sender-public-key | 64 | Public key format invalid | Check the Base64 encoding of the public key |
error-could-not-parse-public-key | 64 | Public key parsing failed | Verify PEM format of public key |
error-could-not-parse-public-key-not-rsa | 64 | The key is not in the RSA format | Use the RSA public key |
X-PAPE-SIGNATURE-BASE64-must-be-set | 64 | Missing signature header | Add X-PAPE-SIGNATURE-BASE64 header |
error-decoding-sender-signature | 64 | Signature format invalid | Check the Base64 encoding of the signature |
error-signature-mismatch | 64 | Signature verification failed | Re-sign with the correct private key |
not-allowed-to-access-this-resource | 64 | Authorization insufficient | Check permissions, use correct credentials |
auth-user-not-same-as-sender-user | 00 | An authenticated user differs from the sender | Use correct authentication context |
Configuration Errors
| Error Detail | Code | Description | Action |
|---|---|---|---|
sender-gateway-transaction-channel-must-be-pre-funded | 00 | Gateway requires pre-funding | Configure pre-funded channel |
liquidity-provider-id-must-be-set-for-terminating-gateway | 93 | Missing liquidity provider config | Set liquidity provider ID |
exchange-rate-not-must-be-set-for-terminating-gateway | 93 | Missing exchange rate | Configure the exchange rate |
sender-local-payment-confirmation-endpoint-undefined | 31 | Payment confirmation URL missing | Configure confirmation endpoint |
receiver-local-payment-confirmation-endpoint-undefined | 92 | Payment confirmation URL missing | Configure confirmation endpoint |
Recall Payment Errors
| Error Detail | Code | Description | Action |
|---|---|---|---|
payment-with-id-[X]-not-found | 00 | Payment to recall doesn't exist | Verify payment ID |
payment-with-id-[X]-already-recalled | 00 | Payment was already recalled | No action needed, recall complete |
sender-account-mismatch | 80 | Account names don't match | Verify sender account details |
receiver-account-mismatch | 80 | Account names don't match | Verify receiver account details |
Error Response Format
Standard Error Response
{
"error": "error-type-identifier",
"code": "numeric_code",
"description": "Human-readable description",
"data": "additional_context",
"message": "Detailed message"
}AppErrorFormat Response
{
"error": "specific-error-detail",
"code": "XX",
"description": "Standard description for code XX"
}