Commit 7f61f3cc by Stephanie Closson Committed by GitHub

Fix: 404 is returned as an exception. Catch and if 404, don't worry about it (#23505)

parent 3dde8585
......@@ -77,7 +77,14 @@ class GitHubRelease {
if (latestRelease.data.tag_name === `v${pluginInfo.version}`) {
await this.git.client.delete(`releases/${latestRelease.data.id}`);
}
} catch (reason) {
if (reason.response.status !== 404) {
// 404 just means no release found. Not an error. Anything else though, re throw the error
throw reason;
}
}
try {
// Now make the release
const newReleaseResponse = await this.git.client.post('releases', {
tag_name: `v${pluginInfo.version}`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment