Repository navigation
Restore IllegalStateException from the provider serializers - #76
Merged
Merged
Conversation
#71 switched the model, voice, transcriber and transfer-destination serializers to throw SerializationException for an unregistered DTO class, because kotlinx-serialization 1.12 wrapped any other exception in JsonEncodingException. kotlinx-serialization 1.13.0 (#75) reverted that wrapping, so the switch is no longer needed and would only be a behavior change for consumers catching IllegalStateException. - Serializers use error("Invalid <kind> provider: ...") again; the four files match their pre-#71 contents - ModelSerializerTest and ProviderSerializerErrorTest assert exactly IllegalStateException with the same message, which also guards against kotlinx-serialization reintroducing the wrapping - CHANGELOG / RELEASE_NOTES: drop the serializer entry and the now-empty "Upgrading from 1.8.2" section - llms.txt: Kotlinx Serialization 1.13.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
#71 switched the model, voice, transcriber and transfer-destination serializers from
IllegalStateExceptiontoSerializationExceptionfor an unregistered DTO class. It did so because kotlinx-serialization 1.12 wrapped every other exception inJsonEncodingException. #75 moved to kotlinx-serialization 1.13.0, which reverts that wrapping. The switch no longer serves a purpose, and it would be an unnecessary behavior change for consumers who catchIllegalStateException.error("Invalid <kind> provider: …")again. The four files match their pre-Bump Gradle 9.9.0 and deps; throw SerializationException from provider serializers #71 contents.ModelSerializerTestandProviderSerializerErrorTestassert exactlyIllegalStateExceptionwith the same message. They also catch it if kotlinx-serialization ever reintroduces the wrapping.CHANGELOG.md/RELEASE_NOTES.md: removes the serializer entry and the now-empty Upgrading from 1.8.2 section.llms.txt: Kotlinx Serialization 1.13.0 (missed in Bump Gradle 9.9.1, kotlinx-serialization 1.13.0, kotlin-logging 8.0.7 #75).Test plan
./gradlew :vapi4k-core:test --tests ProviderSerializerErrorTest --tests ModelSerializerTestpasses: 20 tests, including all four unregistered-DTO cases:vapi4k-core:lintKotlinand:vapi4k-core:detektpass🤖 Generated with Claude Code