onFailed

open fun onFailed(job: JobInfo, error: Throwable?)(source)

The job gave up for good, either because the worker said so or because it ran out of attempts. JobInfo.failureReason says which, and error is set when the worker threw.