Skip to content

Handle ApiError without axios response#807

Open
miachillgood wants to merge 1 commit into
XeroAPI:masterfrom
miachillgood:codex/fix-api-error-missing-response
Open

Handle ApiError without axios response#807
miachillgood wants to merge 1 commit into
XeroAPI:masterfrom
miachillgood:codex/fix-api-error-missing-response

Conversation

@miachillgood
Copy link
Copy Markdown

Summary

  • handle Axios errors that do not include a response object without throwing a secondary error
  • fall back to status code 0, empty headers, and the original error message body for network/auth setup failures
  • add ApiError regression coverage for missing-response errors and normal response-backed errors

Fixes #765.

Tests

  • npm test -- --runInBand
  • npm run build

@miachillgood miachillgood force-pushed the codex/fix-api-error-missing-response branch from 6cb3415 to 0091d5e Compare May 31, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ApiError throws when response is undefined – fails to handle network/auth errors gracefully

1 participant