diff --git a/slack-notify/action.mjs b/slack-notify/action.mjs index 78cfca6..313f593 100644 --- a/slack-notify/action.mjs +++ b/slack-notify/action.mjs @@ -38,10 +38,7 @@ if (dryRun) { } }) if (!response.ok) { - throw new Error(`Request failed with status ${response.status} ${response.statusText}`) - } - const { ok, error } = await response.json() - if (!ok) { - throw new Error(`Request failed with error ${error}`) + const { ok, error } = await response.json() + throw new Error(`Request failed with status ${response.status} ${response.statusText}. Error: ${error}`) } }