mirror of
https://github.com/joelwmale/webhook-action.git
synced 2026-09-01 13:50:45 +08:00
End action if an error is encountered
This commit is contained in:
@@ -26,6 +26,7 @@ async function run() {
|
|||||||
if (res.status >= 400) {
|
if (res.status >= 400) {
|
||||||
// throw an error
|
// throw an error
|
||||||
error(res.status);
|
error(res.status);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// output the status
|
// output the status
|
||||||
@@ -37,6 +38,7 @@ async function run() {
|
|||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
error(err.status);
|
error(err.status);
|
||||||
|
return;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user