Improve error categorizations
This commit is contained in:
parent
db40ac46b9
commit
1d367b0bec
24 changed files with 47 additions and 38 deletions
2
lib/actions-util.js
generated
2
lib/actions-util.js
generated
|
|
@ -177,7 +177,7 @@ async function getRef() {
|
|||
const hasShaInput = !!shaInput;
|
||||
// If one of 'ref' or 'sha' are provided, both are required
|
||||
if ((hasRefInput || hasShaInput) && !(hasRefInput && hasShaInput)) {
|
||||
throw new Error("Both 'ref' and 'sha' are required if one of them is provided.");
|
||||
throw new util_1.UserError("Both 'ref' and 'sha' are required if one of them is provided.");
|
||||
}
|
||||
const ref = refInput || getRefFromEnv();
|
||||
const sha = shaInput || (0, util_1.getRequiredEnvParam)("GITHUB_SHA");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue