Repository navigation
Expose HTTP response metadata on Dropbox exceptions - #482
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #482 +/- ##
==========================================
+ Coverage 64.38% 68.98% +4.59%
==========================================
Files 18 18
Lines 1696 1754 +58
Branches 159 166 +7
==========================================
+ Hits 1092 1210 +118
+ Misses 533 475 -58
+ Partials 71 69 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
AndreyVMarkelov
enabled auto-merge (squash)
November 16, 2026 06:37
rhui-dbx
approved these changes
Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HTTP response status and headers are currently lost when the SDK raises an exception. This change exposes
DropboxException.ResponseStatusCode(int?) andResponseHeaders(IReadOnlyDictionary<string, IReadOnlyList<string>>) across RPC, upload, download, and OAuth refresh errors.The transport captures a deeply read-only, case-insensitive snapshot of both response and content headers before disposal, preserving multiple values. Structured 409 errors carry the snapshot through the internal result. Retry exhaustion exposes the final response; existing request IDs, valid concrete exception types, constructors, messages, and retry policy remain unchanged.
Valid structured error decoding and lazy exception construction remain unchanged. Unexpected EOF inside an unfinished JSON object or array now raises
JsonReaderExceptioninstead of allowing decoding to loop on a stale token. This includes truncated string arrays, nested arrays, and nullable elements. A structured error body of JSONnullraisesJsonReaderExceptioninstead ofNullReferenceException. Unrelated decoder failures propagate unchanged; HTTP metadata is not guaranteed when decoding fails. No response objects, retry history, raw body API, or header logging are added.Adds XML API documentation, a README example, and mocked-handler coverage for 400/401/403/404/409/418/422/429/500/503, all route styles, OAuth invalid_grant, disposal, immutability, malformed bodies, retry exhaustion, and body-based RetryAfter.
Fixes #38.
Validation
netstandard2.0target: 0 warnings, 0 errors.dotnet format --verify-no-changes --severity warnon changed C# files: passed (workspace-loading warning).git diff --check: passed.net8.0tests ran withDOTNET_ROLL_FORWARD=Major. Local execution on the .NET 8 runtime and live integration tests was not performed. See the GitHub checks for the latest .NET 8 and live integration results.Checklist
General Contributing
Is This a Code Change?
Validation