Skip to content

[Tech]: String to ObjectID Catch #147

Description

@cbolles

Description

On NestJS transform pipes, implicitly the backend is casting the string to an ObjectID which can throw an error instead of returning a BadRequestException.

Updating the transform to validate the string first.

Areas

Backend

Justification

Error logs will be cleaner and the API will provide more correct feedback.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions