Share via


ClientRetryPolicy.ShouldRetry(PipelineMessage, Exception) Method

Definition

A method that can be overridden by derived types to customize the default ClientRetryPolicy logic. It is called from Process(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32) after control has been returned from the policy at the position after the retry policy in the pipeline.

protected virtual bool ShouldRetry (System.ClientModel.Primitives.PipelineMessage message, Exception? exception);
abstract member ShouldRetry : System.ClientModel.Primitives.PipelineMessage * Exception -> bool
override this.ShouldRetry : System.ClientModel.Primitives.PipelineMessage * Exception -> bool
Protected Overridable Function ShouldRetry (message As PipelineMessage, exception As Exception) As Boolean

Parameters

message
PipelineMessage

The PipelineMessage for this pipeline invocation.

exception
Exception

The exception, if any, that was thrown from a policy after the retry policy in the pipeline.

Returns

Applies to