-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Controllers not available when OnApplicationBootstrap fires #2795
Comments
At the moment, we do call |
Glad to hear! I'd suggest the two event version - one before (as a final setup task), one after listen. That wouldn't break existing code, and there's merit in having both, no? |
Bug Report
Current behavior
The lifecycle docs state that when
OnApplicationBootstrap
happens:Called once the application has fully started and is bootstrapped
. However, controllers are not accessible at this time.Context: I'm trying to register a webhook with Nest during that event. The webhook provider immediately sends a test message to the registered endpoint (my Nest application), and fails because the request is not routed. If I introduce an artificial delay, the registration works.
Expected behavior
The event should probably fire once the app is indeed ready, and requests are being routed, no? Alternatively, maybe second event? Basically one to finalize after bootstrapping, and one to work when the app is actually live?
Environment
Nest version: 6.5.3
The text was updated successfully, but these errors were encountered: