Overview
Cordial's APIs will return an error if anything goes wrong. Each error has an HTTP status code and returns a short message with the problem in the response body. If your API call returns an error, the explanations below and the corresponding endpoint article here in the Knowledge Base provide additional information.
Enable error logging
API logging must be enabled for the API key in use.
1. To enable error logging, navigate to Settings > API Keys.
2. Select the API key and set API logging to Enabled.
3. API errors are logged on the Account Monitoring page.
4. Select API under All categories to view errors for enabled API keys.
Errors on the Account Monitor page store the endpoint, key, issue description, and JSON structure of the request and response body. Information stored in the values of the request body will be redacted to protect proprietary information.
4xx error codes
An HTTP response status code beginning with a 4 indicates a client-side error. If any of the 4xx server error response codes appear as a result of an API call, one or more modifications to the input is needed to meet the requirements for a successful API call. This table is available to help resolve errors that may appear across any of the Cordial API endpoints.
errorKey | Message | Modification |
---|---|---|
RECORD_NOT_FOUND |
Record not found. | No record associated with the given identifier was found. |
INVALID_JSON_PROVIDED |
Invalid JSON provided. | Ensure that each input is the correct corresponding data type. |
UNSUPPORTED_MEDIA_TYPE |
Unsupported Media Type: Content-Type header must be application/json or application/x-www-form-urlencoded. | Check that the Content-Type header is input as one of the two acceptable options. |
VALIDATION_ERROR |
Various validation error messages | Inspect for missing or invalid values. |
STORAGE_CONNECTION_ERROR |
Login failed. Invalid file path '{path}'. Unable to open connection to {server} : {port} Could not initialize SFTP subsystem on {server}:{port} Incorrect path {path} Bucket doesn't exist. You do not have access for writing in storage {name}. Unable to login by FTP to server ({tserver}:{port}). Unable to login by FTP, username is empty Unable to turn on passive mode on server ({server}:{port}). Incorrect path {path} Connection failed: {description} |
Each of these messages involves an error with the external storage source provided. |
STORAGE_TYPE_NOT_SUPPORTED |
Store type not supported. | The provided external storage type is not currently supported. |
CHANNEL_NOT_FOUND |
Channel does not exist. | Valid channel options are: email, SMS, push. |
CONTENT_VALIDATION_NO_SUBSCRIBED_CONTACTS |
At least one user should be subscribed to the channel. | At least one user should be subscribed to the channel. |
CONTENT_VALIDATION_ERROR |
Internal error received on content validation. | The request body likely has invalid input. |
CONTACT_NOT_EXIST |
Contact does not exist. | The provided identifier did not return a contact. |
ACCOUNT_TZ_NOT_SET |
Account timezone is not set. | Setting a time zone for this account will resolve this error. |
EXPORT_CONFIGURATION_ERROR |
Unable to login by FTP, username is empty Storage is not configured Please check your Google Cloud connection in Marketplace |
Each of these messages involves an error with the external storage source provided. |
IMPORT_CONFIGURATION_ERROR |
Undefined index: port | Ensure the correct port has been input. |
5xx error codes
An HTTP response status code beginning with a 5 indicates a server-side error. 500 (Internal Service Error) and 503 (Service Unavailable) appear to be the most commonly experienced server-side codes logged for the API. These errors are all monitored internally to ensure the most accurate guidance can be given to resolve the issue.
If any of the 5xx server error response codes appear as a result of an API call, contact your support team member as soon as possible, so they can check the internal log for the cause of the issue and provide a solution.
Comments
0 comments
Please sign in to leave a comment.