HttpErrorModule

PackageAxial.HttpClient

Summary

NameSignatureSynopsis
describeHttpError.describe _arg1Formats an HTTP error with its redacted request context.
tryResponseHttpError.tryResponse _arg1Returns the response transcript when the error carries one.
isTransientHttpError.isTransient _arg1Indicates whether retrying the same request could plausibly succeed.
transientPolicyHttpError.transientPolicy maxAttempts baseDelayBuilds a retry policy with exponential backoff that retries only transient HTTP errors.

describe

HttpError.describe _arg1
Member
Formats an HTTP error with its redacted request context. <example><code>error |&gt; HttpError.describe</code></example>

Parameters

NameTypeDescription
_arg1HttpError

Returns

string

tryResponse

HttpError.tryResponse _arg1
Member
Returns the response transcript when the error carries one. <example><code>HttpError.tryResponse error</code></example>

Parameters

NameTypeDescription
_arg1HttpError

Returns

HttpResponse option

isTransient

HttpError.isTransient _arg1
Member
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

NameTypeDescription
_arg1HttpError

Returns

bool

transientPolicy

HttpError.transientPolicy maxAttempts baseDelay
Member
Builds a retry policy with exponential backoff that retries only transient HTTP errors. <example><code>workflow |&gt; Flow.Runtime.retry (HttpError.transientPolicy 4 (TimeSpan.FromMilliseconds 200.0))</code></example>

Parameters

NameTypeDescription
maxAttemptsint
baseDelayTimeSpan

Returns

RetryPolicy<HttpError>