Skip to content
Developer home

errorDetails

  Less than to read

The errorDetails object

Throughout a Transaction Import’s lifecycle it can encounter various pieces of information, warnings or errors which could be useful to the end user. As a result, we capture and record this information on the Transaction Import itself and this is visible on a GET request. An error will always try to be recorded in any case where we were unable to process the Transaction Import. A warning will typically be recorded to the Transaction Import if we believe a piece of information should be brought to the users attention, however, we will still process the Transaction Import after the user has confirmed, even with warnings. Finally, info is recorded to the Transaction Import when we believe the information being recorded is useful overview data, for example, number of transactions to be processed.

Error list

Below is a list of all the types of errors you can expect to see. This does not mean the ‘message’ will always be the same for every error of this type.

"errorDetails": [
    {
        "severity": "error",
        "code": "ValidationError",
        "message": "One or more fields were missing, or failed to match the required specification",
        "target": "unknown"
    }
],

A validation error is typically seen when one or more fields within the supplied data or file failed to meet the specification.


"errorDetails": [
    {
        "severity": "error",
        "code": "ProcessingError",
        "message": "File format not supported",
        "target": "File"
    }
],

Processing errors are used for various reasons, an example would be if an unsupported file format was submitted.


"errorDetails": [
    {
        "severity": "error",
        "code": "ProcessingError",
        "message": "Failed to parse file",
        "target": "File"
    }
],

There was a problem parsing the file which was uploaded.


"errorDetails": [
    {
        "severity": "error",
        "code": "ProcessingError",
        "message": "TransactionImport has already been deleted",
        "target": "unknown"
    }
],

The error response if the DELETE endpoint is called on a Transaction Import that has already been deleted.


"errorDetails": [
    {
        "severity": "error",
        "code": "ProcessingError",
        "message": "Failed to create an S3 pre-signed POST URL",
        "target": "unknown"
    }
],

The type of error returned if there’s a problem with the S3 service when creating a pre-signed URL.


"errorDetails": [
    {
        "severity": "error",
        "code": "ProcessingError",
        "message": "Failed to get file from S3 bucket",
        "target": "unknown"
    }
],

Unable to GET file from S3 bucket.


"errorDetails": [
    {
        "severity": "error",
        "code": "ProcessingError",
        "message": "Failed to insert item into database",
        "target": "unknown"
    }
],

The type of DB error response. For example, unable to save a Transaction Import request to the DB (issue with DynamoDB).


"errorDetails": [
    {
        "severity": "error",
        "code": "ProcessingError",
        "message": "This Batch is not currently accepting additional uploads of TransactionDetails and AccountDetails",
        "target": "unknown"
    }
],

This error will be returned if the status of the batch on PAPI is in any other status other than ‘accepting’.


"errorDetails": [
    {
        "severity": "error",
        "code": "ProcessingError",
        "message": "Failed to process Batch on Provider API",
        "target": "unknown"
    }
],

Something went wrong with PAPI processing the submitted batch of transactions. Another example of why the above error would be added to the Transaction Import, would be if PAPI returned a 500 (Internal Server Error) status code to the connector. The above is a more user friendly message that has more meaning on the Transaction Import.


"errorDetails": [
    {
        "severity": "error",
        "code": "AuthorizationError",
        "message": "The provided credentials are not valid for this request",
        "target": "unknown"
    }
],

A 401 AuthorizationError is returned if the credentials provided aren’t valid for the request the user is trying to perform, for example, delete a Transaction Import which they’re not authorised to do so.


"errorDetails": [
    {
        "severity": "error",
        "code": "ProcessingError",
        "message": "No statementId found on the TransactionImport",
        "target": "unknown"
    }
],

A 409 will be returned if data can not be found, for example a Transaction Import was not found with the provided ID.


"errorDetails": [
    {
        "severity": "error",
        "code": "ProcessingError",
        "message": "The TransactionImport is not in the correct state for this operation",
        "target": "unknown"
    }
],

A 409 will be returned if the status of a Transaction Import isn’t in a valid status when the Transaction Import is confirmed.


{
    status: 429,
    code: 'TooManyRequests',
    message: 'Too many requests'
}

A 429 is returned if the user has exceeded the rate limit for the API Lambda. DOS prevention. This isn’t returned as errorDetails.


{
    status: 500,
    code: 'InternalServerError',
    message: 'An error occurred while processing the request'
}

A standard Internal Server Error. Typically used when something went wrong unexpectedly and the error could not be handled.


"errorDetails": [
    {
        "severity": "warn",
        "message": "found transactions for accounts not requested for this import",
        "ignoredTransactions": "16"
    }
],

Warning messages will be used when the information could be useful to the end user and might impact their decision to proceed with the Transaction Import. For example, we display the number of ignored transactions after submitting a batch to PAPI.


"errorDetails": [
    {
        "severity": "info",
        "message": "file deleted from S3"
    },
    {
        "severity": "info",
        "message": "batch deleted from providerAPI"
    },
    {
        "severity": "info",
        "message": "deleted TransactionImport"
    }
],

Info messages are used and added to the errorDetails object to show key milestones throughout the Transaction Import. Above is the array of messages you’d typically see when deleting a Transaction Import


"errorDetails": [
    {
        "severity": "info",
        "message": "JSON.parse(data)"
    },
    {
        "severity": "info",
        "message": "data in PAPI format, nothing to validate"
    },
    {
        "severity": "info",
        "message": "data in PAPI format, nothing to transform"
    }
],

The info returned to the user if they submitted a file that’s already formatted and transformed for PAPI