Handle 403 errors on attachments

This commit is contained in:
Jamie Kyle 2024-02-08 18:17:52 -08:00 committed by GitHub
parent a329189489
commit 2434d5f16e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,8 +28,8 @@ export async function downloadAttachment(
try { try {
downloaded = await doDownloadAttachment(server, migratedAttachment); downloaded = await doDownloadAttachment(server, migratedAttachment);
} catch (error) { } catch (error) {
// Attachments on the server expire after 30 days, then start returning 404 // Attachments on the server expire after 30 days, then start returning 404 or 403
if (error && error.code === 404) { if (error && (error.code === 404 || error.code === 403)) {
return null; return null;
} }