We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 453e20e commit 56b7811Copy full SHA for 56b7811
apps/workers/src/app/posts.controller.ts
@@ -15,7 +15,11 @@ export class PostsController {
15
@EventPattern('post', Transport.REDIS)
16
async post(data: { id: string }) {
17
console.log('processing', data);
18
- return this._postsService.post(data.id);
+ try {
19
+ return await this._postsService.post(data.id);
20
+ } catch (err) {
21
+ console.log('Unhandled error, let\'s avoid crashing the worker', err);
22
+ }
23
}
24
25
@EventPattern('submit', Transport.REDIS)
0 commit comments