Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Auth retry handler cannot be overridden and default retry handler does not handle CURL exceptions (code 0) well.

Open
#4,062 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
php

Research direction

Start with Core/src/RequestWrapper.php around line 318 and Core/src/RetryDeciderTrait.php around line 99. Trace how auth token fetching selects the retry handler and how the default decider treats CURL exceptions with code 0. Done means the handler and retry criteria can be overridden and code-0 CURL failures are handled appropriately.

Written by the indexing model from the issue text.

Description

type: feature request

Please allow the overriding of auth retry method and the type of codes/messages the default retry decider will retry on.

Fetching Auth tokens does not allow you to override the default retry functionality.
https://github.com/googleapis/google-cloud-php/blob/master/Core/src/RequestWrapper.php#L318

The default retry function does not handle CURL exception well which come back as 0 error code and cannot be overridden because the method and property are both labeled as private.
https://github.com/googleapis/google-cloud-php/blob/master/Core/src/RetryDeciderTrait.php#L99

For some background info, we did not have auth token caching enabled for our CLI processes and a blip in the SSL transit at oauth2 kicked up a bunch of untried exceptions which resulted in some toil for us. We are adding the auth token caching for our CLI as well as some retry logic in app. However the current design of the classes below had already driven us to implement other work around for the curl exception code of 0. This hasd largely been due to some carrier transit issues on our side but I think making these small changes would be a solid win. Thanks!

Dominant language
PHP
Stars
1.2k
Forks
464
Avg merge
2d 2h
Merged PRs (30d)
103

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from googleapis/google-cloud-php

All issues in googleapis/google-cloud-php

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.