Closed ScottRudiger closed 5 years ago
To aid in debugging and error handling, errors will now include a message in the format `TaxJar: ${error} - ${detail}`.
message
`TaxJar: ${error} - ${detail}`
For example, assuming a 401 - Unauthorized error:
401 - Unauthorized
client.categories().catch(err => { console.assert(err.message === "TaxJar: Unauthorized - Not authorized for route 'GET /v2/categories'"); console.assert(err.error === 'Unauthorized'); console.assert(err.detail === "Not authorized for route 'GET /v2/categories'"); console.assert(err.status === 401); });
See #33 for further discussion.
To aid in debugging and error handling, errors will now include a
message
in the format`TaxJar: ${error} - ${detail}`
.For example, assuming a
401 - Unauthorized
error:See #33 for further discussion.