GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Retry ExceptionHandler could be set through ServiceOptions · Issue #1289 · googleapis/google-cloud-java

Retry ExceptionHandler could be set through ServiceOptions #1289

New issue
Copy link
New issue
Copy link
Closed
Closed
Retry ExceptionHandler could be set through ServiceOptions#1289
Copy link
Assignees
Horneth

Description

@Horneth
Horneth
opened on Sep 27, 2016
Issue body actions

The StorageImpl class and others use the EXCEPTION_HANDLER defined in the BaseService class when invoking runWithRetries.

The RetryParams and Clock can be set in the ServiceOptions and will be used when invoking runWithRetries, however the exception handler seems hardcoded.

Is that a definitive decision or would it be possible to have the exception handler also be passed through the options ?

Why

In order to be particularly resilient to transient errors it would be beneficial to be able to retry on a larger set of exceptions.

Activity

  1. mziccard commented on Sep 28, 2016

    @mziccard
    mziccard
    on Sep 28, 2016
    Contributor
    More actions

    Is that a definitive decision or would it be possible to have the exception handler also be passed through the options ?

    We already retry all exceptions that are retryable according to service documentation (see https://cloud.google.com/storage/docs/xml-api/reference-status#standardcodes for Storage). If you believe we are missing some don't hesitate to open an issue.

    In order to be particularly resilient to transient errors it would be beneficial to be able to retry on a larger set of exceptions.

    Do you have an example of exceptions you would want to retry?
    This is not a good idea in general. Retrying exceptions that are not marked as retryable by the service might just result in more errors (for instance you might be trying to create the same object twice). For such exceptions, I encourage to implement your own retry logic at the application level, that possibly does some checks/cleanup before retrying.

  2. Horneth commented on Sep 28, 2016

    @Horneth
    Horneth
    on Sep 28, 2016
    Author
    More actions

    Thanks for the answer.

    I encourage to implement your own retry logic at the application level, that possibly does some checks/cleanup before retrying

    That's already what we're doing and it looks a lot like what's already in the exception handler, only with some additional custom logic, so I was wondering if there was a way to leverage that and get rid of our retry layer. But I understand the purpose of the built-in retry now.

    As for examples it varies but we are making a lot of requests and we sometimes hit QPS limits, or transient 500s and even 403s at times. We need to be robust to as many transient errors as possible so we need to retry on those.

  3. Horneth
    closed this as completedon Sep 28, 2016
  4. JustinBeckwith
    assigned
    Horneth
    on Feb 1, 2021
  5. github-actions
    added 2 commits that reference this issue on Oct 10, 2022

    deps: update dependency com.google.cloud:google-cloud-core to v2.8.21 (…

    73003af

    chore(main): release 2.3.18 (#1290)

    ef7d5ec
  6. meltsufin
    added a commit that references this issue on Dec 22, 2025

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    8bcdba1
  7. chingor13
    added a commit that references this issue on Jan 6, 2026

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    825b15c
  8. chingor13
    added a commit that references this issue on Jan 22, 2026

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    d529d34
  9. chingor13
    added 2 commits that reference this issue on Feb 24, 2026

    feat: add code sample and test for getting an access token from an im…

    826ee40

    Revert "feat: add code sample and test for getting an access token fr…

    2d867b0
  10. suztomo
    added a commit that references this issue on Mar 11, 2026

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    76bbf30
  11. chingor13
    added 2 commits that reference this issue on Mar 12, 2026

    feat: add code sample and test for getting an access token from an im…

    8b070a5

    Revert "feat: add code sample and test for getting an access token fr…

    f012163
  12. suztomo
    added a commit that references this issue on Mar 23, 2026

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    4b989dd
  13. suztomo
    added a commit that references this issue on Mar 30, 2026

    chore: update graalvm version to 22.3.3 in kokoro cfg files. (#1889) (#…

    3399b32
  14. lqiu96
    added a commit that references this issue on Apr 1, 2026

    chore: update graalvm version to 22.3.3 in kokoro cfg files. (#1889) (#…

    8fc77e6
  15. meltsufin
    added 4 commits that reference this issue on Apr 29, 2026

    deps: update dependency org.junit.vintage:junit-vintage-engine to v5.…

    216ba7d

    chore(main): release 1.120.18 (#1290)

    7e02696

    deps: update dependency org.junit.vintage:junit-vintage-engine to v5.…

    9343675

    chore(main): release 1.120.18 (#1290)

    a173db4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Horneth
    Horneth

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.