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

Update ModelContent.Part enum decoding strategy #115

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

andrewheard
Copy link
Collaborator

Updated the ModelContent.Part decoding implementation to throw if text or inlineData fields are included in the payload but decoding fails. This allows us to see the DecodingError thrown instead of it being hidden by try?.

This makes it consistent with the discussion in #114 (comment).

@github-actions github-actions bot added component:swift sdk Issue/PR related to Swift SDK status:awaiting review PR awaiting review from a maintainer labels Mar 5, 2024
@andrewheard andrewheard requested a review from morganchen12 March 5, 2024 19:37
@andrewheard andrewheard merged commit dfea475 into main Mar 5, 2024
9 checks passed
@andrewheard andrewheard deleted the ah/modelcontent-part-decoding branch March 5, 2024 20:00
@github-actions github-actions bot removed the status:awaiting review PR awaiting review from a maintainer label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:swift sdk Issue/PR related to Swift SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants