-
Notifications
You must be signed in to change notification settings - Fork 83
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
Uncaught exception inside cron crashes app #440
Comments
Would you like to create a PR for this issue? :) A simple try..catch block with a |
Sure, I'll give it a try |
Fixed in 0.4.2 |
@kamilmysliwiec "dependencies": {
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
"@nestjs/schedule": "^4.0.2",
} @Timeout(10 * 1000)
handleAfter10Seconds() {
this.todo();
}
async todo() {
await new Promise((resolve) => setTimeout(resolve, 10 * 1000));
throw new Error('Error');
} throw new Error('Error');
^
Error: Error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm submitting a...
Current behavior
Uncaught exception inside cron crashes app
https://github.com/Boshen/nestjs-playground/blob/master/src/app.service.ts#L12-L15
Expected behavior
Any of these:
I've dug through node-cron and it seems they don't have a global catcher also. But as a framework we should mitigate this somehow. My production app crashed a few times ;-)
The text was updated successfully, but these errors were encountered: