Add Dropbox API error classification and contract audits#288
Merged
Conversation
Introduce typed error codes for auth failures (auth_required, app_key_required, auth_exchange_failed, auth_refresh_failed) and Dropbox API errors (not_found, path_conflict, permission_denied, rate_limited, dropbox_api_error). Classify SDK errors via typed matching and Dropbox summary extraction. Expand JSON contract coverage with golden schema checks, success-test coverage tracking, and golden success-output fixtures for all structured-output commands so wrappers, fields, statuses, kinds, warnings, and representative payloads stay stable.
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.
Summary
auth_required,not_found,permission_denied,rate_limited,dropbox_api_error,path_conflict) via typed error matching, reflection-based summary extraction, and message parsingauth_required,app_key_required,auth_exchange_failed,auth_refresh_failed) and wire them into all auth error pathsTest plan
TestJSONErrorCodeClassifiesDropboxAPIErrorscovers typed SDK errors, wrapped errors, and string-format errorsTestJSONErrorCodeDoesNotClassifyPlainValidationStringsprevents false positivesTestStructuredOutputGoldenSchemaAuditvalidates schema fixture against code-derived schemasTestStructuredOutputGoldenSuccessOutputAuditvalidates golden JSON examples match codeTestStructuredOutputSuccessFixtureAuditverifies test function references existgofmt,go vet,golangci-lintall pass