Skip to content

Commit 13a870c

Browse files
authored
fix: recover watch stream on more error types (#9995)
* fix: Recover watch stream on more error types. RST_STREAM for example is INTERNAL * fix: match recovered stream exceptions to node.js implementation, https://github.com/googleapis/nodejs-firestore/blob/25472e11a0e1a4a5e1931b1652d125f9c8cabf11/dev/src/watch.ts\#L817
1 parent 154c8ec commit 13a870c

File tree

1 file changed

+10
-1
lines changed
  • firestore/google/cloud/firestore_v1

1 file changed

+10
-1
lines changed

firestore/google/cloud/firestore_v1/watch.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,16 @@
5757
"DO_NOT_USE": -1,
5858
}
5959
_RPC_ERROR_THREAD_NAME = "Thread-OnRpcTerminated"
60-
_RECOVERABLE_STREAM_EXCEPTIONS = (exceptions.ServiceUnavailable,)
60+
_RECOVERABLE_STREAM_EXCEPTIONS = (
61+
exceptions.Aborted,
62+
exceptions.Cancelled,
63+
exceptions.Unknown,
64+
exceptions.DeadlineExceeded,
65+
exceptions.ResourceExhausted,
66+
exceptions.InternalServerError,
67+
exceptions.ServiceUnavailable,
68+
exceptions.Unauthenticated,
69+
)
6170
_TERMINATING_STREAM_EXCEPTIONS = (exceptions.Cancelled,)
6271

6372
DocTreeEntry = collections.namedtuple("DocTreeEntry", ["value", "index"])

0 commit comments

Comments
 (0)