Skip to content

fix: include error details in 500/5xx ServerError messages#154

Merged
asachs01 merged 1 commit intomainfrom
fix/improve-500-error-messages
Mar 15, 2026
Merged

fix: include error details in 500/5xx ServerError messages#154
asachs01 merged 1 commit intomainfrom
fix/improve-500-error-messages

Conversation

@asachs01
Copy link
Collaborator

Summary

  • Improve ServerError messages to include error details from responseData.errors for 500-level responses. Previously, 5xx errors showed only the generic status text, making debugging extremely difficult.
  • The Autotask API often returns actionable details in the errors array even for 500 responses (e.g., missing required field names).

Relation to PR #150

This PR extracts the error message improvement from PR #150 by @shaank0, rebased cleanly onto main (which already has the correct gzip compression fix). The gzip changes from PR #150 are not included since main now properly compresses when enableCompression=true.

Test plan

  • npx tsc — compiles without errors
  • 500 error responses with errors array in body will now surface those details in the error message
  • 500 errors without errors array continue to work as before

🤖 Generated with Claude Code

The Autotask API often returns actionable error details in the `errors`
array even for 500-level responses. Previously these were swallowed and
only the generic status message was shown, making debugging difficult.

Cherry-picked from shaank0/fix/remove-false-gzip-content-encoding (PR #150).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant