mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Misc Webhooks Fixes (#12038)
* fix(webhooks): don t parse response as json * upgrade got to version 10 * remove old header * fix tests * fix email auth * add migration * update email error * split migration in two
This commit is contained in:
@@ -13,10 +13,10 @@ function sendWebhook (webhook, body, user) {
|
||||
const { url, lastFailureAt } = webhook;
|
||||
|
||||
got.post(url, {
|
||||
body,
|
||||
json: true,
|
||||
json: body,
|
||||
timeout: 30000, // wait up to 30s before timing out
|
||||
retry: 3, // retry the request up to 3 times
|
||||
// Not calling .json() to parse the response because we simply ignore it
|
||||
}).catch(webhookErr => {
|
||||
// Log the error
|
||||
logger.error(webhookErr, 'Error while sending a webhook request.');
|
||||
|
||||
Reference in New Issue
Block a user