610
// Unexpected but retryable error
611
if e.unexpectedErrorAttempts >= e.maxUnexpectedErrorAttempts() && e.dlqEnabled() {
612
>
// Keep this message in sync with the log line mentioned in Investigation section of docs/admin/dlq.md
executable.go
613
>
e.logger.Error("Marking task as terminally failed, will send to DLQ. Maximum number of attempts with unexpected errors",
614
>
tag.UnexpectedErrorAttempts(int32(e.unexpectedErrorAttempts)), tag.Error(err))
615
>
e.terminalFailureCause = err // <- Execute() examines this attribute on the next attempt.
616
>
metrics.TaskTerminalFailures.With(e.chasmMetricsHandler).Record(1)
617
>
return fmt.Errorf("%w: %w", ErrTerminalTaskFailure, e.terminalFailureCause)
618
>
}
619
620
return err