Skip to content

Cannot throw HttpError from async action. #460

@alefsteim

Description

@alefsteim

Hi!

I've encountered an annoying issue: I cannot throw error from async controller action.

 @Put("/:id/report")
  async report() {
    throw new NotFoundError("Test");
}

This code does not return any response, while if i remove async keyword everything works fine.

Any ideas why this happening?Thanx!

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: awaiting answerAwaiting answer from the author of issue or PR.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions