Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-1874

Investigate using serde_path_to_error in deserialization code

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • bson-2.12.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Rust Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The serde_path_to_error deserializer wrapper provides much more useful deserialization errors than serde's standard error messages. We should consider using it throughout the driver wherever we perform deserialization. We should also benchmark to make sure using this wrapper isn't a performance/memory usage hit. If it does make an impact, we could consider adding a feature flag for it. We've had many user complaints about serde's lack of detail in deserialization errors, so users might still want to use this wrapper even if it comes with a penalty.

            Assignee:
            abraham.egnor@mongodb.com Abraham Egnor
            Reporter:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: