Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors are not thrown inside async functions while streaming #413

Closed
QuiiBz opened this issue Dec 25, 2022 · 0 comments · Fixed by #416
Closed

Errors are not thrown inside async functions while streaming #413

QuiiBz opened this issue Dec 25, 2022 · 0 comments · Fixed by #416
Assignees
Milestone

Comments

@QuiiBz
Copy link
Member

QuiiBz commented Dec 25, 2022

When errors are thrown after the return new Response(...) while streaming, the runtime hangs and never timeout or error. Instead, errors should be propagated and the timeout should stop the execution if it's hanging indefinitely.

Reproduction code:

export async function handler() {
  const { readable } = new TransformStream();

  async function hang() {
    doesNotExists();
  }

  hang();

  return new Response(readable);
}
@QuiiBz QuiiBz added this to Roadmap Dec 25, 2022
@QuiiBz QuiiBz converted this from a draft issue Dec 25, 2022
@QuiiBz QuiiBz added this to the Alpha milestone Dec 25, 2022
@QuiiBz QuiiBz moved this from Todo to In Progress in Roadmap Dec 25, 2022
Repository owner moved this from In Progress to Done in Roadmap Dec 26, 2022
@QuiiBz QuiiBz self-assigned this Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant