Table of Contents

Class SendError

Namespace
Excalibur.Dispatch.Transport
Assembly
Excalibur.Dispatch.Transport.Abstractions.dll

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

Exception

The exception that caused the error, or null.

IsRetryable

Gets a value indicating whether the operation can be retried.

public bool IsRetryable { get; init; }

Property Value

bool

true if the error is transient and retryable; otherwise, false.

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)

Parameters

exception Exception

The exception that occurred.

isRetryable bool

Whether the error is retryable.

Returns

SendError

A new SendError instance.