Skip to content
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

[Enhancement] Add DecodingError as associated type in decode enum case in ResponseError #1

Merged
merged 1 commit into from
May 17, 2023

Conversation

gentilijuanmanuel
Copy link
Contributor

Hello! I'm using this package for a side project, so thank you for open sourcing it 🙂

This PR is a proposal to add Swift.DecodingError as an associated value in the .decode enum case in ResponseError. The reason: sometimes, when you're debugging an API call with lots of properties and sub-objects, is useful to inspect the Xcode Console and see which property doesn't have the correct type. Without exposing Swift.DecodingError, this ability is hidden by the package.

It's just a proposal so feel free to close it if you don't consider it's applicable for your package!

Copy link
Owner

@mdb1 mdb1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for this addition 🚀. I've written a custom Logger for decoding errors in the past, I'll try to find it and add it to the library if I do.

@mdb1 mdb1 merged commit c5d0585 into mdb1:main May 17, 2023
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.

2 participants