Workflow input value type mismatch is swallowed by "GitHub Actions has encountered an internal error when running your job."

Hi Team,

Githiub actions swallows errors caused by workflow inout parameter type mismatches and throws a

GitHub Actions has encountered an internal error when running your job.

with no logs or context. took a while to track done as per:

@shilovmaksim was able to track this down in this reproduction

and fix it

but the error message coming from github actions doesn’t help at all. It seems like it should be a simple thing for github actions to tell the user they’ve sent bad data!

1 Like

Got hit by this today. Definitely +1 for handling the exception and returning a helpful error message. The worst part is that you don’t get a hint on which parameter is causing the problem, and of course you can never be sure it’s not something else entirely (e.g., ongoing incident, as reported here for instance)

1 Like

I just had this issue. It was caused by passing boolean inputs coming from workflow_dispatch to a reusable workflow.

While the workflow_dispatch input was set to boolean, the value you actually receive inside github.event.inputs is in fact a string, thus causing this error when forwarding the input to the reusable workflow (that also expects a boolean).

The fix was to do:

  reusable_workflow_boolean_input: ${{ github.event.inputs.boolean_input_from_workflow_dispatch == 'true' }}

@JCMais sir you’re a genius. i exactly have this very narrow edge case issue ; i’m gonna try this right away.

1 Like