mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-20 04:38:55 +00:00
dataexport: correctly handle 403 errors
This commit is contained in:
parent
c08df9978f
commit
a9d4bbd87d
1 changed files with 2 additions and 1 deletions
|
|
@ -203,7 +203,8 @@ api.exportUserAvatarPng = {
|
|||
try {
|
||||
response = await got.head(s3url);
|
||||
} catch (gotError) {
|
||||
if (gotError.code !== 'ENOTFOUND' && gotError.statusCode !== 404) {
|
||||
// If the file does not exist AWS S3 can return a 403 error
|
||||
if (gotError.code !== 'ENOTFOUND' && gotError.statusCode !== 404 && gotError.statusCode !== 403) {
|
||||
throw gotError;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue