<PackageReference Include="Polly.Core" Version="8.4.1" />

TimeoutRejectedException

Exception thrown when a delegate executed through a timeout resilience strategy does not complete, before the configured timeout.
using System; using System.Runtime.CompilerServices; using System.Threading; namespace Polly.Timeout { [NullableContext(1)] [Nullable(0)] public class TimeoutRejectedException : ExecutionRejectedException { public TimeSpan Timeout { get; set; } = System.Threading.Timeout.InfiniteTimeSpan; public TimeoutRejectedException() : base("The operation didn't complete within the allowed timeout.") { } public TimeoutRejectedException(string message) : base(message) { } public TimeoutRejectedException(string message, Exception innerException) : base(message, innerException) { } public TimeoutRejectedException(TimeSpan timeout) : base("The operation didn't complete within the allowed timeout.") { Timeout = timeout; } public TimeoutRejectedException(string message, TimeSpan timeout) : base(message) { Timeout = timeout; } public TimeoutRejectedException(string message, TimeSpan timeout, Exception innerException) : base(message, innerException) { Timeout = timeout; } } }