Error Handling
Error Handling & Responses
Pliant uses known HTTP response codes to indicate the success or failure of a API requests.
- Codes in the
2xx
range indicate a successful operation. - Codes in the
4xx
range indicate an error. The requested action could not complete with the provided data (for instance, a required parameter was omitted). - Codes in the
5xx
range indicate an error on Pliants servers. Here a retry can be made after some short amount of time. Please use a backoff value to not constantly retry with the same delay.
Error code | Description of error code |
---|---|
200 | All good, everything went as expected! |
202 | Accepted. The request was successful, please wait until the callback is triggered, since this is an asynchronous operation. |
204 | No Content. The request was successful, but the system has no content to return. Most likely due to a deactivate feature module for the requested entity. |
400 | Bad Request. The API consumer sent a malformed request which could not be processed. |
401 | Unauthorized. The API consumer is not authorized to access the requested resource. |
403 | Forbidden. The API consumer is not allowed to access the requested resource. |
404 | Not Found. The requested resource could not be found. |
409 | Conflict. The action could not be completed, because the resource is locked. |
500 | Internal Server Error. The request was not completed due to an internal error. |
503 | Service Unavailable. The request was not completed due to an internal error. |
Common Error Messages
Below you can find common error messages we might send to you, related to the platform's business logic. Please keep in mind that this list does not cover every single error that can potentially occur but if you want to start with granular error handling we advise you to start with these and cover additional ones with a generic error handler.
Endpoint Group | Error Code | Error Message |
---|---|---|
Cardholder | USER_ALREADY_EXISTS | User with the same email already exists in organization [${organizationId}] |
Receipt | RECEIPT_FILE_ERROR | Receipt file type not supported: image/gif |
Receipt | RECEIPT_UPLOAD_NOT_ENABLED | receiptUploadEnabled set to false for the transactionId=${transactionId} |
Card | ILLEGAL_ARGUMENTS_PROVIDED | Activation code doesn't match |
Card | INVALID_ACCESS_CODE | Invalid card access code for card activation |
Card | ILLEGAL_STATUS_TRANSITION | Card in status ${card.status} cannot be unlocked |
Card | LOCKED_BY_CARD_CONTROL | Card is locked by card control, it cannot be unlocked manually |
Card | NOT_ACTIVE_ORG | Card can be issued only for ACTIVE organizations. organizationId: {$organizationId}, organizationStatus: {$organization.status} |
Card | INVALID_PHONE_NUMBER | Phone number must start with '+' followed by 8 to 15 numbers. memberId: ${cardholderId}, phoneNumber: {$phoneNumber} |
Card | CARD_NAME_NOT_SUPPORTED | card names are not supported for {cardType} type cards |
Card | ILLEGAL_ARGUMENTS_PROVIDED | Unsupported validity period. Virtual card validity period must be one of [3, 6, 9, 12, 18, 24, 30, 36] |
Card | ILLEGAL_ARGUMENTS_PROVIDED | If card control categories are used, all fields are mandatory |
Card | ILLEGAL_ARGUMENTS_PROVIDED | If card control merchants are used, all fields are mandatory |
Card | ILLEGAL_ARGUMENTS_PROVIDED | If card control dates are used, all fields are mandatory |
Card | ILLEGAL_ARGUMENTS_PROVIDED | If card control times are used, all fields are mandatory |
Card | ILLEGAL_ARGUMENTS_PROVIDED | DATE or TIME card controls can't be set while using card validity params |
Card Request | ISSUANCE_LIMIT_EXCEEDED | Issuance limit reached. Card is not created. memberId=[${memberId}], organizationId=[{$organizationId}], cardConfig=[${cardConfig}] |
Card Request | COMMENT_IS_MANDATORY | Comment is mandatory for SINGLE_USE card - Example error message: Comment is a mandatory field |
General | API_VERSION_NOT_SUPPORTED | Minimum API version=2.1.0, provided version=2.0.0 |
General | ILLEGAL_ARGUMENTS_PROVIDED | Payload is missing mandatory fields |
Updated 7 months ago