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