Skip to content

Commit

Permalink
Handle error code '5' as 'NOT_FOUND' (#26)
Browse files Browse the repository at this point in the history
This code is listed as NOT_FOUND in grpc: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
  • Loading branch information
gh2k authored Apr 26, 2020
1 parent bfe8609 commit 48f0a51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function adapter(pubsub, opts) {
this.initializing = false;
subscription.on('message', this.onmessage.bind(this, subscription));
subscription.on('error', err => {
if (err.code !== 404) {
if (![404, 5].includes(err.code)) {
throw err;
}
});
Expand Down

0 comments on commit 48f0a51

Please sign in to comment.