Handle errors
Read AvaTax error responses and retry safely.
AvaTax returns standard HTTP status codes. On failure, the body contains an error object with a machine-readable code, a human-readable message, and a details array pinpointing the problem.
Error response
Status codes
Retrying safely
Calculation is deterministic, so retrying transactions/create with the same document code is safe — AvaTax returns the existing transaction rather than duplicating it.
Log the full error.code and details on failures. The refersTo field points at the exact line or address that caused the problem, which makes support tickets far faster to resolve.

