Skip to content

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

@brajkannan

Description

@brajkannan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions