Skip to content

Surface API response bodies on errors - #1824

Open
JordanNoone wants to merge 1 commit into
mainfrom
fix-1754-api-error-body
Open

Surface API response bodies on errors#1824
JordanNoone wants to merge 1 commit into
mainfrom
fix-1754-api-error-body

Conversation

@JordanNoone

Copy link
Copy Markdown

Summary

  • read the response body before returning a zoo api HTTP error
  • include a non-empty server response in the error message
  • format the HTTP status once instead of repeating its reason phrase

Tests

  • cargo fmt --check
  • focused test target compiled locally; execution requires ZOO_TEST_TOKEN and will run in CI

Closes #1754

@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.94%. Comparing base (0c27251) to head (f160a9b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1824   +/-   ##
=======================================
  Coverage   65.94%   65.94%           
=======================================
  Files          43       43           
  Lines        8434     8434           
=======================================
  Hits         5562     5562           
  Misses       2872     2872           
Flag Coverage Δ
unittests 65.94% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JordanNoone
JordanNoone marked this pull request as ready for review August 29, 2026 23:46
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.

zoo api discards the server error body and duplicates the reason phrase ("404 Not Found Not Found")

1 participant