Errors


Error Response

If an error occurs during a request, the response will be in the following format:

{
    "errors": [
        {
            "message": "jwt expired", // Human-readable error message
            "code": "UNAUTHENTICATED", // Standard code, see list below
            "errorContext": [
                 {
                     "field": "vendorId",
                     "value": "ven_abc123"
                 }
             ]
        }
    ]
}

Error Context

Some errors include an optional errorContext array with additional details about what caused the error. The shape of each entry depends on the error type:

Input errors (BAD_USER_INPUT, RESOURCE_NOT_FOUND) — identifies the invalid field:

FieldTypeDescription
fieldstringThe name of the invalid input field
valuestringThe value that was rejected (if any)

Resource state errors (FORBIDDEN, RESOURCE_GONE, RESOURCE_LOCKED, RESOURCE_PROCESSING) — identifies the affected resource:

FieldTypeDescription
resourceTypestringThe type of the resource (e.g. vendor, bill)
resourceIdstringThe external ID of the resource

errorContext is omitted from the response when there is no additional context to provide (e.g. UNAUTHENTICATED, INTERNAL_SERVER_ERROR).

Error Reference

The following is a list of all possible errors in the Puzzle API:

HTTP Status CodeError CodeDescription
400BAD_USER_INPUTThe input provided is invalid. This can include missing fields, invalid values, etc.
401UNAUTHENTICATEDThe authentication credentials provided are missing, invalid, or expired.
403FORBIDDENYou do not have permission to the requested resource.
404RESOURCE_NOT_FOUNDNo resource exists for the given ID.
409RESOURCE_PROCESSINGThe requested resource has not finished syncing in Puzzle. If this error occurs, try the request again later.
410RESOURCE_GONEA resource exists for the given ID, but it cannot be accessed. This is likely due to the resource being removed by the user in Puzzle.
422RESOURCE_LOCKEDA resource exists for the given ID, but it cannot be updated. This is likely due to the resource being deactivated or locked by the user in Puzzle.
500INTERNAL_SERVER_ERRORAn unexpected error has occurred on our end. Try the request again later, but if the error persists, please reach out to Puzzle support ([email protected]).