HttpErrorModule
PackageAxial.HttpClient
Summary
| Name | Signature | Synopsis |
|---|---|---|
| describe | HttpError.describe _arg1 | Formats an HTTP error with its redacted request context. |
| tryResponse | HttpError.tryResponse _arg1 | Returns the response transcript when the error carries one. |
| isTransient | HttpError.isTransient _arg1 | Indicates whether retrying the same request could plausibly succeed. |
| transientPolicy | HttpError.transientPolicy maxAttempts baseDelay | Builds a retry policy with exponential backoff that retries only transient HTTP errors. |
Formats an HTTP error with its redacted request context.
<example><code>error |> HttpError.describe</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| _arg1 | HttpError |
Returns
string
Returns the response transcript when the error carries one.
<example><code>HttpError.tryResponse error</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| _arg1 | HttpError |
Returns
HttpResponse option
Indicates whether retrying the same request could plausibly succeed.
Connection failures, timeouts, and 408/429/5xx statuses are transient.
<example><code>if HttpError.isTransient error then retry ()</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| _arg1 | HttpError |
Returns
bool
Builds a retry policy with exponential backoff that retries only transient HTTP errors.
<example><code>workflow |> Flow.Runtime.retry (HttpError.transientPolicy 4 (TimeSpan.FromMilliseconds 200.0))</code></example>
Parameters
| Name | Type | Description |
|---|---|---|
| maxAttempts | int | |
| baseDelay | TimeSpan |
Returns
RetryPolicy<HttpError>

