Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1645

Type Mismatch Errors during decode should use a custom type

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      When a type mismatch error occurs during decoding a struct or slice, the driver should return a typed error such that I can check specifically for that and do something with it different than other types of decode errors. 

      Something like

      type TypeMismatchError struct {
          Got bsontype.Type
          Expected bsontype.Type
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            craig.wilson@mongodb.com Craig Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: