Aracılığıyla paylaş


RetryPolicy.ShouldRetry(HttpMessage, Exception) Method

Definition

This method can be overriden to control whether a request should be retried. It will be called for any response where IsError is true, or if an exception is thrown from any subsequent pipeline policies or the transport. This method will only be called for sync methods.

protected internal virtual bool ShouldRetry (Azure.Core.HttpMessage message, Exception? exception);
abstract member ShouldRetry : Azure.Core.HttpMessage * Exception -> bool
override this.ShouldRetry : Azure.Core.HttpMessage * Exception -> bool
Protected Friend Overridable Function ShouldRetry (message As HttpMessage, exception As Exception) As Boolean

Parameters

message
HttpMessage

The message containing the request and response.

exception
Exception

The exception that occurred, if any, which can be used to determine if a retry should occur.

Returns

Whether or not to retry.

Applies to