Expose the startup_failure reason via the REST/GraphQL API #200011
Replies: 2 comments
-
|
I’ve hit this exact wall before and it’s incredibly frustrating. I spent way too long looking through the Actions, Checks, and Logs APIs assuming I was missing something, only to discover that the detailed error is only available in the UI. For 'startup_failure', the reason is usually the most important piece of information. Knowing that a workflow failed to start is helpful, but knowing why it failed to start is what actually lets you fix it. Would love to see the same message that's shown in the Actions UI exposed through either the workflow run API or the check suite API. |
Beta Was this translation helpful? Give feedback.
-
|
Hey! When a workflow fails with startup_failure, the UI shows the exact reason (e.g. a YAML syntax error on a specific line), but there's no way to get that message via the API. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
💬 Feature/Topic Area
API
Body
When a workflow run ends in
conclusion: startup_failure- e.g. invalid workflow YAML, or a top-levelpermissions:block missingactions: read- the web UI shows a precise reason, for example:But that reason is not available through any public API. I verified this against a real
startup_failurerun:GET /repos/{o}/{r}/actions/runs/{id}conclusion: startup_failure, no message/error fieldGET /repos/{o}/{r}/actions/runs/{id}/jobstotal_count: 0GET /repos/{o}/{r}/actions/runs/{id}/logs404GET /repos/{o}/{r}/check-suites/{id}/check-runs(incl.?filter=all)total_count: 0checkSuite.checkRuns0Because the workflow file never parsed, no job or check run is ever created - so there is nothing for the API to return. The reason clearly exists server-side (the UI renders it), it's just not surfaced anywhere callable.
Why this matters
We run a GitHub App that listens for
check_suitecompleted events and posts a Slack alert onstartup_failure. We can link the run, but we can't tell the team why it failed - which is the single most useful piece of information. Reading the workflow file ourselves can't reproduce GitHub's exact parser error.Prior art
This was asked (@ohaval) in 2023 in https://github.com/orgs/community/discussions/57536 and left unanswered - the only workaround offered was scraping the run page HTML, which is brittle and doesn't work for private repositories.
Request
Surface the startup-failure reason via the API - for example an
error/messagefield on the workflow run or check suite object, or an annotation reachable through the Checks API.Beta Was this translation helpful? Give feedback.
All reactions