Fixes for upgrade

This commit is contained in:
tsickert 2024-03-30 15:17:23 +00:00
parent 29f99762f7
commit f4badf5fa9
2 changed files with 7 additions and 3 deletions

View file

@ -41,7 +41,7 @@ jobs:
webhook-url: ${{ secrets.WEBHOOK_URL }}
filename: __tests__/data/content-only.json
username: Bill
content: You should definintely be able to do this
content: You should definitely be able to do this
avatar-url: https://cdn.discordapp.com/avatars/742807869023322232/dd41912939ffccbea0276f70688fa0ec.webp?size=256
- name: Discord Webhook Action With Embed
uses: ./

View file

@ -171,8 +171,12 @@ export async function executeWebhook(): Promise<void> {
}
})
} else {
const response = await client.postJson(webhookUrl, payload)
await handleResponse(response)
try {
const response = await client.postJson(webhookUrl, payload)
await handleResponse(response)
} catch (e) {
core.error(`Error occurred while executing webhook: ${e}`)
}
}
}