Skip to content

fix: use API detail message in BundleNotFoundError instead of raw URL#20

Merged
justinmerrell merged 1 commit intomainfrom
fix/404-error-detail-message
Mar 31, 2026
Merged

fix: use API detail message in BundleNotFoundError instead of raw URL#20
justinmerrell merged 1 commit intomainfrom
fix/404-error-detail-message

Conversation

@justinmerrell
Copy link
Copy Markdown
Contributor

Summary

  • Parse RFC 9457 detail field from 404 responses and use it in BundleNotFoundError instead of the raw request URL
  • Falls back to URL when no JSON body is present (backward compatible)
  • Added test for 404 with JSON body
  • Synced uv.lock version

Before: Bundle not found: https://api.musher.dev/v1/namespaces/ns/bundles/slug:resolve?version=1.0.0
After: Bundle not found: Bundle version with identifier '1.0.0' not found

Test plan

  • task check passes (228 tests, 95% coverage, lint + types clean)
  • Verified against live platform at api.musher.dev

🤖 Generated with Claude Code

When the API returns a 404 with an RFC 9457 Problem Details body, the
SDK now extracts and surfaces the `detail` field (e.g., "Bundle version
with identifier '1.0.0' not found") instead of showing the raw request
URL. Falls back to URL when no JSON body is present.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@justinmerrell justinmerrell merged commit 05a6540 into main Mar 31, 2026
6 checks passed
@justinmerrell justinmerrell deleted the fix/404-error-detail-message branch March 31, 2026 22:02
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