Skip to content

Rejecting streamed data #9785

Description

@rfberaldo

Describe the bug

When rejecting promises for streamed data, dev server usually crashes, and when it doesn't crash it doesn't show my custom error message.

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-2dz1kb?file=src/routes/+page.server.js

Logs

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Not Found".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

System Info

System:
    OS: Linux 5.19 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
    Memory: 7.30 GB / 15.53 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Firefox: 112.0.1
  npmPackages:
    @sveltejs/adapter-node: ^1.2.2 => 1.2.3 
    @sveltejs/kit: ^1.15.7 => 1.15.7 
    svelte: ^3.58.0 => 3.58.0 
    vite: ^4.3.1 => 4.3.1

Severity

serious, but I can work around it

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingerror handlingp1-importantSvelteKit cannot be used by a large number of people, basic functionality is missing, etc.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions