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
PUB-43: Better Error handling #39
Conversation
const subscriberInstance = new subscriberClass(); | ||
await subscriberInstance.init(); | ||
subscription.on('message', (message: GoogleCloudMessage): void => { | ||
const subscriber = new subscriberClass(); | ||
subscriber.init(); | ||
subscriber.handleMessage(Message.fromGCloud(message)).catch(() => { | ||
message.nack(); | ||
}); | ||
subscriberInstance | ||
.handleMessage(Message.fromGCloud(message)) | ||
.catch(() => { | ||
message.nack(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a change in behavior that could cause possible problems if someone's usage depends on having a fresh this
available in every handleMessage
call.
…o feature/PUB-43-better-error-handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
da060fa
Closes PUB-43
Closes #34