mirror of
https://github.com/peter-evans/repository-dispatch.git
synced 2026-07-22 02:27:41 +00:00
Improve error message for 404 errors
This commit is contained in:
5
dist/index.js
vendored
5
dist/index.js
vendored
@@ -60,8 +60,13 @@ function run() {
|
||||
}
|
||||
catch (error) {
|
||||
core.debug(util_1.inspect(error));
|
||||
if (error.status == 404) {
|
||||
core.setFailed('Repository not found, OR token has insufficient permissions.');
|
||||
}
|
||||
else {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
run();
|
||||
|
||||
@@ -24,8 +24,14 @@ async function run(): Promise<void> {
|
||||
})
|
||||
} catch (error) {
|
||||
core.debug(inspect(error))
|
||||
if (error.status == 404) {
|
||||
core.setFailed(
|
||||
'Repository not found, OR token has insufficient permissions.'
|
||||
)
|
||||
} else {
|
||||
core.setFailed(error.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run()
|
||||
|
||||
Reference in New Issue
Block a user