Skip to content

Commit

Permalink
feat: Add CANCELLED to StreamWriter retryable error code (#1725)
Browse files Browse the repository at this point in the history
* feat:Add CANCELLED to retryable error code

* feat:Add CANCELLED to retryable error code

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
yirutang and gcf-owl-bot[bot] committed Aug 1, 2022
1 parent cfa6158 commit 6d4c004
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -56,13 +56,13 @@ implementation 'com.google.cloud:google-cloud-bigquerystorage'
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-bigquerystorage:2.17.0'
implementation 'com.google.cloud:google-cloud-bigquerystorage:2.18.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-bigquerystorage" % "2.17.0"
libraryDependencies += "com.google.cloud" % "google-cloud-bigquerystorage" % "2.18.0"
```

## Authentication
Expand Down
Expand Up @@ -635,7 +635,9 @@ private boolean isRetriableError(Throwable t) {
if (Errors.isRetryableInternalStatus(status)) {
return true;
}
return status.getCode() == Status.Code.ABORTED || status.getCode() == Status.Code.UNAVAILABLE;
return status.getCode() == Code.ABORTED
|| status.getCode() == Code.UNAVAILABLE
|| status.getCode() == Code.CANCELLED;
}

private void doneCallback(Throwable finalStatus) {
Expand Down

0 comments on commit 6d4c004

Please sign in to comment.