Skip to content

Add "expose" to "new createError.[code || name]([msg]))" syntax #78

Description

@maneetgoyal

Hi all,

Please consider add support for expose property in new createError.[code || name]([msg])) like syntax.

We use new createError.name([msg])) a lot because of its readability. It also mitigates the need to remember all those status codes. Being able to do something like below will be of great help.

varerr=newcreateError.NotFound("Show this error to client.",{expose: true, ...});

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions