hush-hush

RetryPolicy
in package

FinalYes

Retries a request only on network failure or an HTTP 5xx/429 response, using exponential backoff with jitter, and honors a `Retry-After` response header ahead of the computed backoff delay when present. Any other 4xx is never retried — it won't succeed on a second attempt, and retrying only delays the real error reaching the caller.

Table of Contents

Methods

decider()  : callable
delay()  : callable
delayMs()  : int
retryAfterMs()  : int|null

Methods

decider()

public static decider(int $maxRetries) : callable
Parameters
$maxRetries : int
Return values
callable

delay()

public static delay() : callable
Return values
callable

delayMs()

public static delayMs(int $retries[, ResponseInterface|null $response = null ]) : int
Parameters
$retries : int
$response : ResponseInterface|null = null
Return values
int

retryAfterMs()

private static retryAfterMs(ResponseInterface $response) : int|null
Parameters
$response : ResponseInterface
Return values
int|null
On this page

Search results