All: Handle Dropbox payload_too_large error

pull/9380/head
Laurent Cozic 2023-11-26 10:44:21 +01:00
parent 46ce792ef2
commit f267d8853b
1 changed files with 3 additions and 1 deletions

View File

@ -186,7 +186,9 @@ class FileApiDriverDropbox {
);
} catch (error) {
if (this.hasErrorCode_(error, 'restricted_content')) {
throw new JoplinError('Cannot upload because content is restricted by Dropbox', 'rejectedByTarget');
throw new JoplinError('Cannot upload because content is restricted by Dropbox (restricted_content)', 'rejectedByTarget');
} else if (this.hasErrorCode_(error, 'payload_too_large')) {
throw new JoplinError('Cannot upload because payload size is rejected by Dropbox (payload_too_large)', 'rejectedByTarget');
} else {
throw error;
}