-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: BSON
-
None
-
Not Needed
-
There are a number of exported error values and types in the bsoncodec package that do not need to be exported.
Errors that indicate an implementation error typically do not need to support comparison at runtime because we expect users will fix the implementation error rather than write error handling logic. There are a number of exported error values and types in the bsoncodec package that are only used to signal an implementation error and don't need to be exported:
Error values:
- ErrNilType
- ErrNotPointer
- ErrNotInterface
Error types:
- ErrNoEncoder
- ErrNoDecoder
- ErrNoTypeMapEntry
We still need to return errors in most of those cases, but we don't expect users to write error handling logic when any of the above errors are returned.
Definition of done:
- Deprecate all listed error values and types.