Table of Contents

Class TimeoutRejectedException

Namespace
LMKit.Agents.Resilience
Assembly
LM-Kit.NET.dll

Exception thrown when an operation is rejected due to timeout.

public sealed class TimeoutRejectedException : Exception, ISerializable
Inheritance
TimeoutRejectedException
Implements
Inherited Members

Examples

Logging the configured timeout when an operation is rejected:

using LMKit.Agents.Resilience;

try { await timeout.ExecuteAsync(ct => agent.RunAsync(input, ct)); } catch (TimeoutRejectedException ex) { Console.Error.WriteLine($"Agent exceeded configured timeout of {ex.Timeout.TotalSeconds:F1}s."); }

Constructors

TimeoutRejectedException(string, TimeSpan)

Initializes a new instance of the TimeoutRejectedException class.

Properties

Timeout

Gets the timeout duration that was exceeded.

Share