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

Loopback context returning undefined in afterRemote method

Open bajtos opened this issue 9 years ago • 2 comments

@grandhisubrahmanyam35 commented on Wed Nov 30 2016

Bug or feature request

  • [x] Bug
  • [ ] Feature request

Description of feature (or steps to reproduce if bug)

If i trigger any method through afterRemote , In that methods loopback-context returning undefined.

Link to sample repo to reproduce issue (if bug)

Expected result

Actual result (if bug)

Additional information (Node.js version, LoopBack version, etc)


@Amir-61 commented on Wed Nov 30 2016

@grandhisubrahmanyam35

Not sure where you found this hook (afterhook)? AFICT, loopback supports access, before save, after save, before delete, after delete, loaded, persist and some remote hooks like afterRemote and beforeRemote; for OH please see: https://loopback.io/doc/en/lb2/Operation-hooks.html and for remote hooks please see:https://loopback.io/doc/en/lb2/Remote-hooks.html#overview; we also had model hooks which are deprecated now; please see: https://loopback.io/doc/en/lb2/Model-hooks.html

If this answers your question please let us know, so we close this ticket.

Thanks!


@grandhisubrahmanyam35 commented on Wed Nov 30 2016

@Amir-61 Sorry, I suppose to mention afterRemote .


@Amir-61 commented on Thu Dec 01 2016

@grandhisubrahmanyam35 could you reproduce your issue using loopback-sandbox?

Please see: http://loopback.io/doc/en/contrib/index.html#reporting-issues


@bajtos commented on Mon Jan 09 2017

Also note that loopback-context is known to not work in certain common situations, for example when there is a connection pool involved. Let' move the discussion to loopback-context issue tracker.

bajtos avatar Jan 09 '17 12:01 bajtos

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 11 '20 03:02 stale[bot]

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

stale[bot] avatar Feb 27 '20 05:02 stale[bot]