Handle 403 errors on attachments
Co-authored-by: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com>
This commit is contained in:
parent
e73e4ec280
commit
3e19cf244e
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…
Add table
Reference in a new issue