[SERVER-71604] Add ErrorCode for IDL value error instead of using hardcoded value Created: 23/Nov/22  Updated: 29/Oct/23  Resolved: 15/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Fausto Leyva (Inactive) Assignee: James Bronsted
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2023-09-18
Participants:

 Description   

When a value is out of range specified by the idl, the error code is [51024]. Could we consider claiming this value in the error codes yml file? 



 Comments   
Comment by Githook User [ 15/Sep/23 ]

Author:

{'name': 'James Bronsted', 'email': 'james.bronsted@mongodb.com', 'username': 'jpbronsted'}

Message: SERVER-71604 change idl parser to throw BadValue for out-of-range errors
Branch: master
https://github.com/mongodb/mongo/commit/8f4921164a697257ec12225f139c77c650422b6d

Comment by Fausto Leyva (Inactive) [ 29/Nov/22 ]
  • I came across this error code when writing a couple tests to check that the IDL parser catches out of range values (specified by the validator).
  • Some js tests have to specifically comment the value (like so [JSTest example]) so it would be nice if we could use ErrorCodes::InvalidIDLValue (or something along those lines).
  • Here's a [c++ test example] which is mildly ambiguous.
  • This is not a big deal, but I think it could marginally improve code readability surrounding the idl error cases.  
Generated at Thu Feb 08 06:19:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.