System.ClientModel.Primitives.PipelineMessageClassifier
A classifier that can evaluate a PipelineMessage in two ways.
First, given an HTTP message, the PipelineMessageClassifier
can determine whether the service response it holds should be considered an
error response. Second, given an HTTP message and an optional pipeline
exception, the classifier can determine whether or not the
ClientPipeline should retry the request.
A default classifier instance. This classifier will classify a
PipelineResponse with a status code of 4xx or
5xx as an error, and with a status code of 408,
429, 500, 502, 503 and 504 as
retriable.
protected PipelineMessageClassifier()
Create an instance of a PipelineMessageClassifier from a
collection of success status codes.
Attempt to evaluate whether the provided PipelineMessage
contains a Response that the client should
consider an error response.
public abstract bool TryClassify(PipelineMessage message, Exception exception, out bool isRetriable)
Attempt to evaluate whether the provided PipelineMessage
contains a Response that indicates the
client should retry the Request.