Legacy Error Handling

Some of our Partner accounts are configured to respond with legacy error responses. These responses have different errCodes and errMessages to the standard error messages. The legacy Parser error responses rely on the Decryptx error messages, many (but not all) of the errors that originate on Decryptx are also output in the Parser legacy errors.

Error Codes

Error codes can appear in two separate locations within a Parser/Decryptx response:

  1. The errCode property appears at the base of the response object; it represents the high level error for the response. e.g. 1003 Authentication required. Error codes between 1 - 100 originate on the Parser; codes between 1000 and 2000 originate on Decryptx.
  2. In instances where the /api/v1/decrypt/parser endpoint is called and the decryption fails, an errCode is returned with the value of 1303. A more specific error code is also returned in the decrypted array.
{
  "success"    : false,
  "errMessage" : "All values failed to decrypt",
  "errCode"    : 1303,
  "decrypted": [
    {
      "name"    : "track2",
      "failed"  : true,
      "message" : "No CC found in decrypted result",
      "code"    : 1406
    }
  ],
  "messageId": "1201610181032081012815612"
}

Sample 1303 "All decryptions failed" error response. In the decrypted array the "code" property outlines the reason for each specific track failing to decrypt.

Parser Specific Errors

As outlined above, the Parser relies heavily on the Decryptx Service to identify error conditions. However, in some situation where the Parser will return its own errors. This usually occurs when the Parser cannot communicate with the Decryptx Service e.g. connection timeout. Parser specific errors will appear in the errCode property and will be numbers between 1 and 100. In the unlikely event that you receive one of these error codes please notify Bluefin immediately.

errCode Errors

The following table outline the high level error codes that can be returned from API calls to the /api/v1/decrypt/parser endpoint.

Code Description
1-100 Parser cannot communicate with Decryptx
1001 Generic/unknown error code
1003 Authentication required.
1201 Device serial not specified
1202 Device not found/recognized
1203 The indicated device is not currently active
1301 No data to decrypt was provided
1303 All decryptions failed

Decryption Error Codes

The following table outlines the error codes for a failed decryption i.e. the code values of objects contained in the decrypted array.

Code Description
1403 Decryption failed, insufficient data provided. Typically caused by not providing appropriate information in the decryptionParameters property like the sequenceNumber value when one is required.
1404 Decryption failed for some other reason
1406 No CC found in decrypted result

Testing Error Conditions

The following tables outline the error codes, their descriptions, and the steps required to generate the error condition. Where applicable the table will also contain a sample body for a /api/v1/decrypt/parser REST request.

Code 1-100
Description The Parser cannot communicate with the Decryptx Service.
Testing on Parser n/a
Sample body n/a
Code 1001
Description Generic/unknown error code
Testing on Parser n/a
Sample body n/a
Code 1003
Description Authentication required
Testing on Parser POST a request with invalid partnerId or partnerKey.
Sample body {"partnerId":"notreal", "partnerKey":"meeither" }
Code 1201
Description Device serial not specified
Testing on Parser POST a request that included valid data for partnerId and partnerKey, but has empty or corrupt data for the devicePayload.
Sample body {"partnerId":"WATERFORD", "partnerKey":"ef1ad938150fb15a1384b883a104ce70", "devicePayload":"" }
Code 1202
Description Device not found/recognized
Testing on Parser POST a request that included valid data for partnerId and partnerKey, but contains data in devicePayload from a device that isn’t registered against the partner account on the P2PEManager.
Sample body n/a
Code 1203
Description The indicated device is not currently active
Testing on Parser POST a request that included valid data for partnerId and partnerKey but contains a payload in devicePayload from a device that is registered against the partner account, but is set to disabled on the P2PEManager.
Sample body n/a
Code 1301
Description No data to decrypt was provided
Testing on Parser This error will only be returned if the payload is corrupted in a very specific way (chances of it happening are very very slim).
Sample body n/a
Code 1303
Description All decryptions failed
Testing on Parser POST a request that includes valid data for partnerId and partnerKey, for the devicePayload data use the payload from a SREDKey device where the keyed number is shorter than 13 digits and passes the luhn check. E.g. 123456789023
Sample body n/a

The following error codes are specific to encryption errors; they do not appear in the errCode property but within the objects contained in the decrypted array.

Code 1403
Description Decryption failed, insufficient data provided. Typically caused by not providing appropriate information in the decryptionParameters property like the sequenceNumber value when one is required.
Testing on Parser This error will only be returned if the payload is corrupted in a very specific way (chances of it happening are very very slim).
Sample body n/a
Code 1404
Description Decryption failed for some other reason
Testing on Parser n/a
Sample body n/a
Code 1406
Description No CC found in decrypted result
Testing on Parser POST a request that includes valid data for partnerId and partnerKey, for the devicePayload data use the payload from a SREDKey device where the keyed number is shorter than 13 digits and passes the luhn check. E.g. 123456789023
Sample body