diegohaz / diegohaz/querymen

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

Open
#56 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
134
Forks
34
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.