diegohaz/querymen

Is it possible to add validator for checking objectId format when using GET api by objectid [enhancement]

brajkannan opened this issue · 0 comments

Recently, when i pass some unknown value in {id} with GET api by id, it is returning

CastError: Cast to ObjectId failed for value "12" at path "_id"

Is it possible, to add validator for object id check if proper value. if not then throw a proper error message from query men.. if it possible, it would be great for my use case