Skip to content

Custom Body in rest and http errors #72

Closed
@gthicks

Description

@gthicks

In the process of migrating from Restify 4 to Restify 5, it seems that we are no longer able to override the body of the error.

You used to be able to do:
new restify.errors.BadRequestError({body: {whatever: 'you want'}})

After looking through the documentation and the source code, I can't see a way to accomplish this. Is this something that would fit in this project? I would be willing to open a PR if I knew it would be well received.

Thanks, Garret

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions