bensheldon/good_job · error
The `GoodJob::Job#recent_error` method is deprecated and wil
Error message
The `GoodJob::Job#recent_error` method is deprecated and will be removed in the next major release. Replace usage of GoodJob::Job#recent_error with `GoodJob::Job#error`.
What it means
Error "The `GoodJob::Job#recent_error` method is deprecated and will be removed in the next major release. Replace usage of GoodJob::Job#recent_error with `GoodJob::Job#error`." thrown in bensheldon/good_job.
Source
Thrown at app/models/good_job/job.rb:589
else
klass
end
active_job_class.respond_to?(:enqueue_after_transaction_commit)
end
end
# TODO: it would be nice to enforce these values at the model
# validates :active_job_id, presence: true
# validates :scheduled_at, presence: true
# validates :job_class, presence: true
# validates :error_event, presence: true, if: -> { error.present? }
# The most recent error message.
# If the job has been retried, the error will be fetched from the previous {Execution} record.
# @return [String]
def recent_error
GoodJob.deprecator.warn(<<~DEPRECATION)
The `GoodJob::Job#recent_error` method is deprecated and will be removed in the next major release.
Replace usage of GoodJob::Job#recent_error with `GoodJob::Job#error`.
DEPRECATION
error
end
# Errors for the job to be displayed in the Dashboard.
# @return [String]
def display_error
return error if error.present?
serialized_params.fetch('exception_executions', {}).map do |exception, count|
"#{exception}: #{count}"
end.join(', ')
end
# Return formatted serialized_params for display in the dashboardView on GitHub (pinned to 5fcde48f87)
Solutions
- Replace usage of GoodJob::Job#recent_error with GoodJob::Job#error.
- Rename the method call before the next major release removes it.
Example fix
job.error # instead of job.recent_error
When it happens
Trigger: Thrown at app/models/good_job/job.rb:589 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bensheldon/good_job@5fcde48f87 (2026-08-23).
Data as JSON: /api/errors/4dcb7ea3e0cca958.
Report an issue: GitHub.