mirror of
https://github.com/tsickert/discord-webhook.git
synced 2025-02-03 21:16:41 -05:00
Fixes for upgrade
This commit is contained in:
parent
29f99762f7
commit
f4badf5fa9
2 changed files with 7 additions and 3 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -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: ./
|
||||
|
|
|
@ -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}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue