loopback-context icon indicating copy to clipboard operation
loopback-context copied to clipboard

Get null when calling in a callback

Open jmimi opened this issue 10 years ago • 2 comments

When I call getCurrentContext in the middleware, it works. But when I call an async function like fetching from db in the middleware, and calling getCurrentContext in the callback of that async function, I get null

jmimi avatar Aug 21 '16 06:08 jmimi

This is the only open issue in loopback-context where my PR #11 had not been mentioned yet. I'd like to try it on your issue, can you share a minimal example that reproduces your issue? Follow https://github.com/strongloop/loopback/wiki/Reporting-issues In short, you could fork loopback-sandbox and add the code required to reproduce your issue.

josieusa avatar Sep 06 '16 10:09 josieusa

I am closing this issue as abandoned.

bajtos avatar Jan 03 '17 14:01 bajtos