mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix: 404 is returned as an exception. Catch and if 404, don't worry about it (#23505)
This commit is contained in:
committed by
GitHub
parent
3dde8585ff
commit
7f61f3cc43
@@ -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}`,
|
||||
|
||||
Reference in New Issue
Block a user