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

windows: Exceptions from asynchronous functions are not thrown correctly #566

Open
ahaoboy opened this issue Aug 31, 2024 · 2 comments
Open

Comments

@ahaoboy
Copy link
Contributor

ahaoboy commented Aug 31, 2024

Only synchronous exceptions are caught and displayed.
The following code fails to execute without any error message

async function main() {
  throw new Error()
}

main()
@richarddavison
Copy link
Contributor

This is currently a limitation in the QuickJS engine. We are able to capture unhandled promise rejections but that doesn't align with how it's handled in Node.js. We'll be working on a patch for this.

@georeeve
Copy link

georeeve commented Oct 4, 2024

This also seems to be affecting how API Gateway authorizer lambdas return 401s. For example, in a Node.js lambda if you use throw new Error('Unauthorized'), this will return a 401 to the client, but doing the same in an LLRT lambda returns a 500.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants