Skip to content
Tracon

JobErrorCodes

Namespace Tracon · Assembly Tracon.Abstractions.dll

The stable codes a job’s JobRecord.ErrorMessage carries when the failure comes from the queue itself rather than from a handler.

public static class JobErrorCodes

objectJobErrorCodes

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

A code is machine readable and never changes; the prose around it may. A consumer that has to tell “nobody handles this key” apart from “the handler threw” matches on the code, not on the sentence.

The handler registered for the job’s JobRecord.HandlerKey could not be constructed — one of its dependencies is missing from the container — so the job failed without ever being executed.

public const string HandlerActivationFailed = "tracon.job.handler-activation-failed"

string

A configuration mistake, not a transient one: retrying cannot fix a dependency that is not registered. The job is therefore failed rather than released, so it does not re-lease forever. The exception’s own detail goes to the log, under the correlation id the message carries.

No IJobHandler is registered for the job’s JobRecord.HandlerKey, so the job failed without ever being executed.

public const string UnknownHandlerKey = "tracon.job.unknown-handler-key"

string

The persisted message deliberately does not repeat the key: an unregistered key may have come from an untrusted source, and JobRecord.ErrorMessage is read back over HTTP and shown in the UI. The raw key goes to the log only, tagged with the same correlation id the message carries.

Formats the persisted message for code.

public static string Format(string code, string correlationId)

code string

One of this class’s constants.

correlationId string

The id also written to the log entry carrying the untruncated detail, from SafeErrorText.NewCorrelationId.

string

The message to persist.

ArgumentException

code is empty.

ArgumentNullException

correlationId is null.