Disable Failing Webhooks (#11966)

* todo comment

* add failures field to webhooks and sanitize

* implement logic

* use update instead of save

* specify timeout and maximum number of retries

* add tests
This commit is contained in:
Matteo Pagliazzi
2020-03-20 23:26:21 +01:00
committed by GitHub
parent ae7df804cb
commit f8aa756d52
8 changed files with 182 additions and 6 deletions

View File

@@ -248,7 +248,7 @@ api.exportUserAvatarPng = {
let response;
try {
response = await got.head(s3url);
response = await got.head(s3url); // TODO add timeout and retries
} catch (gotError) {
// If the file does not exist AWS S3 can return a 403 error
if (gotError.code !== 'ENOTFOUND' && gotError.statusCode !== 404 && gotError.statusCode !== 403) {