<PackageReference Include="System.ClientModel" Version="1.7.0" />

System.ClientModel.Primitives.PipelineMessageClassifier

public abstract class 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.
namespace System.ClientModel.Primitives { public abstract class PipelineMessageClassifier { public static PipelineMessageClassifier Default { get; } public static PipelineMessageClassifier Create(ReadOnlySpan<ushort> successStatusCodes); public abstract bool TryClassify(PipelineMessage message, out bool isError); public abstract bool TryClassify(PipelineMessage message, Exception exception, out bool isRetriable); protected PipelineMessageClassifier(); } }