Skip to content

Kit crashes if an error is thrown from an async function #2448

@joelanman

Description

@joelanman

Description of the issue

If an error is thrown in an async function, the kit crashes

Steps to reproduce the issue

a route like this will crash:

router.get("/test", async (req, res) => {
  functionDoesNotExist()
})

Actual vs expected behaviour

The kit should catch the error and show an error page as it does with other errors

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