@theholocron/cli 5.0.0-alpha.601 → 5.0.0-alpha.602
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs
CHANGED
|
@@ -5711,7 +5711,16 @@ async function provisionChannel(deps, spec) {
|
|
|
5711
5711
|
try {
|
|
5712
5712
|
await secrets.setSecret(scope, secretName, hook.url);
|
|
5713
5713
|
} catch (err) {
|
|
5714
|
-
|
|
5714
|
+
const stored = `webhook ${webhookName} was ${hook.created ? "created" : "found"} but storing its URL in ${secretName} failed (${describeError(err)})`;
|
|
5715
|
+
if (hook.created && hook.id && notifications.deleteWebhook) {
|
|
5716
|
+
try {
|
|
5717
|
+
await notifications.deleteWebhook(hook.id);
|
|
5718
|
+
} catch (deleteErr) {
|
|
5719
|
+
throw new Error(`${stored}; deleting the webhook it created failed too (${describeError(deleteErr)}) — webhook id ${hook.id} is left in the provider, delete it and re-run`, { cause: deleteErr });
|
|
5720
|
+
}
|
|
5721
|
+
throw new Error(`${stored} — the webhook it created was deleted, so re-run once that is fixed`, { cause: err });
|
|
5722
|
+
}
|
|
5723
|
+
throw new Error(`${stored} — delete the webhook in the provider and re-run to get a fresh URL`, { cause: err });
|
|
5715
5724
|
}
|
|
5716
5725
|
print(` ${style.success(`${hook.created ? "created" : "found "} webhook ${webhookName}; URL stored in ${secretName}`)}`);
|
|
5717
5726
|
if (tally) tally.ok++;
|