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

chore: improve error message for JSON deserialization #1911

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

aludwiko
Copy link
Contributor

No description provided.

@github-actions github-actions bot added java-sdk-protobuf kalix-runtime Runtime and SDKs sub-team labels Dec 13, 2023
Copy link
Member

@octonato octonato left a comment

Choose a reason for hiding this comment

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

LGTM

+ valueClass.getName()
+ "]",
e);
throw genericDecodeException(valueClass, any, e);
Copy link
Member

Choose a reason for hiding this comment

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

In which case would we get a IOException that is not a JsonProcessingException?
Corrupted payload?

Copy link
Member

Choose a reason for hiding this comment

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

Ok, maybe when reading from an external topic that is emitting bad data. In such a case, there is nothing the user can do. Migration won't work anyway.

+ any.getTypeUrl()
+ "] could not be decoded into a ["
+ valueClass.getName()
+ "]. Make sure that changes are backwards compatible or apply a @Migration mechanism (https://docs.kalix.io/java/serialization.html#_schema_evolution).",
Copy link
Member

Choose a reason for hiding this comment

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

Good one!

@aludwiko aludwiko merged commit 77d790e into main Dec 13, 2023
68 checks passed
@aludwiko aludwiko deleted the improving-error-message branch December 13, 2023 08:18
aklikic pushed a commit to aklikic/kalix-jvm-sdk that referenced this pull request Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java-sdk-protobuf kalix-runtime Runtime and SDKs sub-team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants