JobError

data class JobError(val type: String, val message: String?, val stackTrace: String, val attempt: Int, val at: Instant)

The most recent failure recorded against a job: what a dead-letter is triaged from and what a Failed job is waiting on. Written by the runtime on every transition to JobState.Failed and JobState.DeadLettered through com.eventslooped.klokka.spi.JobStore.transition, and read back through com.eventslooped.klokka.spi.JobDetails.lastError.

This is the last error only. Each failed attempt replaces the previous record; a full attempt history and correlation or trace ids are additive later work, not part of it.

Constructors

Link copied to clipboard
constructor(type: String, message: String?, stackTrace: String, attempt: Int, at: Instant)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val at: Instant

When the runtime recorded the error, by the runtime's clock. Informational only: stores never compare it, so the SPI rule against caller-supplied time is untouched.

Link copied to clipboard

The 1-based attempt that produced this error.

Link copied to clipboard
Link copied to clipboard

The platform's rendering of the exception and its cause chain, cut at MAX_STACK_TRACE_CHARS so one failure cannot bloat a row without bound.

Link copied to clipboard

The exception's qualified class name, or its simple name where the platform has none.