Improve error message when the permission `id-token` is missing
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the enhancement
When core.getIDToken from a job without the permission id-token: write, the end-user get Error: Action failed with error: Error: Error message: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable. This error is not really informative of the underlying issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/core/src/oidc-utils.ts at the referenced getIDToken path and trace how a missing ACTIONS_ID_TOKEN_REQUEST_URL is reported. Make the failure explain that the job needs the id-token: write permission, then verify that core.getIDToken produces the clearer message when that permission is absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, security
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100