-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
Not Needed
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Use Case
As a... js-bson developer
I want... compareObjectId to behave the same for web and node versions
So that... I don't have to split the codebase around compareObjectId
User Experience
- Both the web and node versions of compareObjectId throw identical exceptions to identical wrong input
- The node version converts the inputs to buffers and throws if the conversion fails, while the web version returns 0 when the inputs are not valid buffers, this behavior needs to change
Dependencies
- None
Risks/Unknowns
- This is introducing exceptions in code that didn't have them before
- But this also standardizes exceptions
Acceptance Criteria
Implementation Requirements
- Same inputs into both web and node versions of compareObjectId results in the same result: integer output or thrown exception
Testing Requirements
- Tests are passing
Documentation Requirements
- Verify that the documentation on the ByteUtils is correct wrt errors
Follow Up Requirements
- None