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

Log deserialization error on poll. #73

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mstyura
Copy link
Contributor

@mstyura mstyura commented Jan 3, 2024

About the changes

I was debugging some strange feature polling errors in log which occurred to be JSON deserialization error, but it was not clear until I logged error message.

Important files

Discussion points

Should there be some tolerance to deserialization errors? It is occurred that the problem I've got is some deeply nested object declared "variant" in once case to be a string storing number in JSON like:

...{"name":"xxx","weight":"0","payload":{"type":"string","value":"2"}...

Which is occurred to be not a problem to Java's SDK which rely on GSON:
Screenshot 2024-01-03 at 23 22 52

Such deserialization is by default is not supported by serde and require additional work like this

@sjaanus sjaanus assigned sjaanus and unassigned sjaanus Jan 12, 2024
@daveleek
Copy link
Contributor

Hello @mstyura and thank you for your contributions. We'd like to know more about your setup/Unleash instance before we release this. As far as we can tell, Unleash' type system should be sending a proper JSON number. Which version of Unleash are you using, is it self hosted? Does it go through a proxy? (Are you using unleash-proxy?)

@sjaanus sjaanus assigned sjaanus and sighphyre and unassigned sjaanus Jan 16, 2024
@mstyura
Copy link
Contributor Author

mstyura commented Jan 22, 2024

Hello! I had answered most of the questions in neighbor MR #74 (comment)

@alvinometric
Copy link
Contributor

@mstyura is this still needed?

@mstyura
Copy link
Contributor Author

mstyura commented Jul 5, 2024

In general to debug possible future problems like the one I had previously, I think logging error message will dramatically simplify debugging experience of library users.

@vanng822
Copy link

vanng822 commented Sep 21, 2024

Yes please. I just try out this lib and get an error from unleash server but couldn't see why. I had to get into the code, edited those lines and recompiled/rebuilt to see the error.

Still not learn how to debug yet (Visual Studio Code didn't want it yet :-D )

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

Successfully merging this pull request may close these issues.

6 participants