Handle 403 errors on attachments
This commit is contained in:
parent
a329189489
commit
2434d5f16e
1 changed files with 2 additions and 2 deletions
|
@ -28,8 +28,8 @@ export async function downloadAttachment(
|
|||
try {
|
||||
downloaded = await doDownloadAttachment(server, migratedAttachment);
|
||||
} catch (error) {
|
||||
// Attachments on the server expire after 30 days, then start returning 404
|
||||
if (error && error.code === 404) {
|
||||
// Attachments on the server expire after 30 days, then start returning 404 or 403
|
||||
if (error && (error.code === 404 || error.code === 403)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue