How to notify through on_error on concourse pipelines when worker is not available

Hi All

I am trying to store success/failure/errored counts to database from concourse,I am able to get success/failure count by executing the script within each task on_success and on_failure,But for on_error when the workers are not available it doesn’t even get in to the task level it fails at the fetching resource(get),In that case how can we use on_error condition to capture number of errored builds.