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

Improve error understandability when exception thrown during schema generation #267

Open
Chuckame opened this issue Oct 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Chuckame
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As seen in #264, the error weren't explicit at all, especially when you don't know how works the kotlinx serialization library.

Here an example of error:

com.github.avrokotlin.avro4k.internal.AvroSchemaGenerationException: Polymorphic descriptor 'ContextDescriptor(kClass: class kotlinx.serialization.KSerializer, original: kotlinx.serialization.Polymorphic(type: kotlin.String, value: kotlinx.serialization.Polymorphic<KSerializer>))' must have at least one possible schema

Describe the solution you'd like
We have to add the path of this error, to be able to locate well the error as it could be deep in the classes hierarchy.

@Chuckame Chuckame added the enhancement New feature or request label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant