BETTERBOOKS / DEVELOPERS
API error handling and recovery
API error handling and recovery in BetterBooks means treating expired sessions, denied access and uncertain financial mutations deliberately instead of blindly retrying.
Use the application identity flow
An expired session should return through the supported identity process. An access-denied response is not a reason to retry with another company or book identifier. Never log credentials or tokens to troubleshoot authorization.
Read endpoint-specific errors
Consult the deployed API contract for validation and conflict responses. Preserve actionable record context without exposing tokens, credentials or unrelated company data. A successful HTTP response alone is not proof of complete source coverage.
Do not blindly repeat writes
A timeout can occur after a write has been accepted. Reconcile the operation outcome using supported history or recovery features before submitting again. Idempotency support is operation-specific; do not assume a global header makes every endpoint safe to retry.
Separate transport from accounting state
A request can succeed while creating a draft or a preparation record rather than a posted transaction. Inspect the resulting resource state and review the authorized next action.