Skip to content

ClientError: don't call our to localizedDescription in description #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

weissi
Copy link
Member

@weissi weissi commented Feb 7, 2025

Motivation

Fixes apple/swift-openapi-generator#730 . LocalizedDescription doesn't print anything useful for Swift Errors. It just prints ErrorType code 1 regardless what the underlying issue was.

That causes real issues when debugging production software.

Modifications

Correct description to call description/String(describing:).

Result

Can debug software regardless of the transport.

Test Plan

[Describe the steps you took, or will take, to qualify the change - such as adjusting tests and manual testing.]

@czechboy0
Copy link
Contributor

We're unlikely to take this PR, as this would expose error types that never opted into logging.

However, we will fix the forwarding logic to properly separate description and localizedDescription, tracked by apple/swift-openapi-generator#730.

@czechboy0 czechboy0 closed this Feb 8, 2025
@czechboy0 czechboy0 deleted the jw-fix-desc branch February 9, 2025 13:09
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.

Separate error description vs localizedDescription
2 participants