-
Notifications
You must be signed in to change notification settings - Fork 227
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
Pull timeout error doesn't have a code for easy error handling. #412
Comments
You could try increasing the timeout for the request const minute = 60000;
subscriptionClient.pull(null, {timeout: minute * 20}); Otherwise you could use the subscriptionClient.pull({returnImmediately: true}); |
@callmehiphop Sure but the issue with setting the timeout to 20 minutes, during times that the system is not busy the you will still have the same failure, also I personally think having an error code on the error makes more sense so you can identify why the pull failed. In version |
My mistake! I didn't realize that |
@callmehiphop Thanks 😄 |
Closing per #423, should be fixed in the next release! |
Environment details
@google-cloud/pubsub
version: v0.22.0Steps to reproduce
pull
function onpubsub.v1.SubscriberClient
to pull messages from the a subscription, the example code works for testing, here is a bit of code I used to print the message:Printed error
The issue I'm currently facing is I need to handle that error so because it a new
pull
call needs to be started to ensure we keep checking for messages.The text was updated successfully, but these errors were encountered: