# Error handling

Source: https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/raq5096486605758/

Guide: 1099 & W-9

# Error handling

Understand common error codes, their descriptions, and actions to resolve them.

## Common error codes

HTTP Status

Error Code

Description

Action

400

ValidationError

Invalid form data

Fix validation errors and retry

401

Unauthorized

Invalid or expired token

Refresh authentication token

404

NotFound

Form or issuer not found

Verify IDs are correct

422

BusinessRuleViolation

Business rule violation

Check form eligibility rules

429

RateLimitExceeded

Too many requests

Implement exponential backoff

500

InternalServerError

Server error

Retry with exponential backoff

## Error response format

## 400 Bad Request

```
{
    "title": "One or more validation errors occurred.",
    "errors": [
        {
            "type": "issuerId",
            "detail": "Invalid"
        }
    ]
}
```

## 401 Unauthorized

```
{
    "error": {
        "code": "AuthenticationException",
        "message": "Authentication failed.",
        "details": [
            {
                "code": "AuthenticationException",
                "message": "Authentication failed.",
                "description": "Missing authentication or unable to authenticate the user or the account.",
                "faultCode": "Client",
                "helpLink": "http://developer.avalara.com/avatax/errors/AuthenticationException"
            }
        ]
    }
}
```

## 404 NotFound

```
{
    "title": "NotFound",
    "errors": [
        {
            "type": "",
            "detail": "Resource not found"
        }
    ]
}
```