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

Middy stores the request object on the global handler instance #558

Closed
thetrevdev opened this issue Aug 29, 2020 · 0 comments
Closed

Middy stores the request object on the global handler instance #558

thetrevdev opened this issue Aug 29, 2020 · 0 comments

Comments

@thetrevdev
Copy link
Contributor

What are the steps to reproduce this issue?

This code shows the issue:
Calling a handler twice concurrently will clobber the request instance.

https://codesandbox.io/s/purple-star-n3ohc?file=/src/index.js

What happens?

The two requests clobber the instance object replacing both the context and responses.

What were you expecting to happen?

They are scoped and resolve independently

Any logs, error output, etc?

See example above.

What versions of software are you using?

Node.js Version: 10/12

Middy Version: 1.2.0

AWS SDK Version: 2x

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

No branches or pull requests

2 participants