Are there defined cases where the context could be lost while using ClsMiddleware
?
#177
Unanswered
nishkarsh-beamery
asked this question in
Q&A
Replies: 1 comment
-
Please see Compatility considerations in the docs. Context loss can happen when used with some legacy ExpressJS middlewares. You can find some concrete examples on the internet when you search for something like "node.js express AsyncLocalStorage context lost". If you want to find out if your application is compatible with ALS, I suggest you try it out. It either fails or doesn't. I haven't encountered any case where it sometimes fails and sometimes not. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The above statement in the docs mentions that while mounted as middleware, the context could be lost in rare cases. Are such cases defined anywhere?
The question is whether we can reliably use this to store information that has to be present during the request lifecycle for the app to be functional. If such rare cases are not defined, then our app might completely fail without knowing the scenarios where it could fail.
Beta Was this translation helpful? Give feedback.
All reactions