[GODRIVER-1645] Type Mismatch Errors during decode should use a custom type Created: 11/Jun/20  Updated: 30/Mar/22

Status: Backlog
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Craig Wilson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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
}


Generated at Thu Feb 08 08:36:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.