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

Refine exception messages in case of deserializing data from JsonElement. #2648

Merged
merged 3 commits into from
May 14, 2024

Commits on Apr 22, 2024

  1. Refine exception messages in case of deserializing data from JsonElem…

    …ent.
    
    Such a code path is often used when we cannot find type discriminator as a first key in Json (for example, if json input is invalid, and we got a string instead of an object). In such cases, we should display a nice error message.
    
    Also add tag stack — equivalent of a Json path — to most of the error messages. Note that it is far from an ideal, since changing between string and tree decoders (such happens in polymorphism) won't preserve stack or path correctly. Yet, it is the best we can do for now.
    
    Fixes #2630
    sandwwraith committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    c94fcbc View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. Apply suggestions from code review

    Co-authored-by: Sergey Shanshin <sergey.shanshin@jetbrains.com>
    sandwwraith and shanshin committed May 13, 2024
    Configuration menu
    Copy the full SHA
    ccec22c View commit details
    Browse the repository at this point in the history
  2. better test message

    sandwwraith committed May 13, 2024
    Configuration menu
    Copy the full SHA
    5a72be6 View commit details
    Browse the repository at this point in the history