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 message: "Field set to nothing can't be serialized" #1017

Open
msfcolombo opened this issue Dec 11, 2019 · 3 comments
Open

Improve error message: "Field set to nothing can't be serialized" #1017

msfcolombo opened this issue Dec 11, 2019 · 3 comments

Comments

@msfcolombo
Copy link

Customers have huge and complex pipelines. Bond serialization is buried deep in the code, and sporadic errors like a null value in some record may require an humongous amount of time such as connecting to the cloud service for debugging (before getting clearance for doing so), or adding more logs elsewhere (which would be duplicated when Bond is used for logging), and deploying again.

Therefore, this error message is not being helpful at all. It should state at very minimum the field that is not satisfying the condition, and ideally the schema name as well.

@chwarr
Copy link
Member

chwarr commented Dec 11, 2019

Makes sense. Can you submit a PR to improve the message? The line that needs to be changed is 135 in SimpleBinary.cs.

@himanshusainig
Copy link

is there a workaround to this. The bigger issue is boolean with false values are also being omitted.
I need all the fields to be present in the serialized json as this will be deserialized in another application based c++ where these fields are not marked as nullable.

@chwarr
Copy link
Member

chwarr commented Feb 10, 2021

@himanshusainig, this issue is specifically about a better error message when a = nothing field is encountered that cannot be serialized. Can you please create a new issue about your problem? It will be useful to see the .bond schemas that each app. Make sure you've tested with the currently released versions of Bond too, in case the issue has been fixed already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants