Class SendError
Represents an error that occurred during a message send operation.
Replaces PublishError + PublishErrorCategory with a simpler model
using IsRetryable and Code instead of an enum.
public sealed class SendError
- Inheritance
-
SendError
- Inherited Members
- Extension Methods
Properties
Code
Gets the error code (typically the exception type name or a broker-specific code).
public string Code { get; init; }
Property Value
- string
The error code.
Exception
Gets the underlying exception, if available.
public Exception? Exception { get; init; }
Property Value
IsRetryable
Gets a value indicating whether the operation can be retried.
public bool IsRetryable { get; init; }
Property Value
Message
Gets a human-readable description of the error.
public string Message { get; init; }
Property Value
- string
The error message.
Methods
FromException(Exception, bool)
Creates a SendError from an exception.
public static SendError FromException(Exception exception, bool isRetryable = false)