Skip to content

fix: parse JSON API errors with content type parameters - #215

Open
Shubham-Padkonde wants to merge 1 commit into
apple:mainfrom
Shubham-Padkonde:fix/json-error-content-type
Open

Shubham-Padkonde wants to merge 1 commit into
apple:mainfrom
Shubham-Padkonde:fix/json-error-content-type

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

A JSON error response with Content-Type: application/json; charset=utf-8 currently loses its API error code and message because the response parser requires an exact header match. Compare the media type independently of parameters and casing so both clients retain the structured error details.

Adds synchronous and asynchronous regression coverage for parameterized and mixed-case JSON media types, including preservation of Retry-After. All four new subcases fail before the fix and pass afterward.

Validation: 223 tests and all four new subcases pass. The remaining existing live OCSP verification test fails while contacting Apple's OCSP service in this environment, including a retry with network access. git diff --check passes.

This branch has not been deployed

No deployments
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