How can we map an error with retry yaml types?

We have the set of retry types to define for retry.when

But we don’t have anything to map with these types in an arbitrary job with an arbitrary reason OR in the gitlab runner logs, or I don’t see it.

Do we have anything? If not I’m ready to open an issue, it should be possible to troubleshoot the reasons

An example case is:

  • You get an error in the job
  • You want to retry it because you know it’s a flakiness
  • You find the type in the job logs OR in gitlab runner server side logs
  • You map the type and set it as retry.when

Looks like we can use webhooks event data Webhook events | GitLab where the field is build_failure_reason which matches exactly with the retry types