chore(fix): fixes sync response not correctly identifying all errors (#2346)

This commit is contained in:
Mo
2023-07-05 11:28:45 -05:00
committed by GitHub
parent 2a050fd966
commit 0ab6b5c6fe
19 changed files with 81 additions and 49 deletions

View File

@@ -386,7 +386,7 @@ export class FileService extends AbstractService implements FilesClientInterface
const result = await this.api.deleteFile(tokenResult, file.shared_vault_uuid ? 'shared-vault' : 'user')
if (result.data?.error) {
if (isErrorResponse(result)) {
const deleteAnyway = await this.alertService.confirm(
spaceSeparatedStrings(
'This file could not be deleted from the server, possibly because you are attempting to delete a file item',
@@ -400,7 +400,7 @@ export class FileService extends AbstractService implements FilesClientInterface
)
if (!deleteAnyway) {
return ClientDisplayableError.FromError(result.data?.error)
return ClientDisplayableError.FromNetworkError(result)
}
}