Handle 403 errors on attachments
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user