fix: Shows informative error on UI when file upload limit is reached (#2961)
This commit is contained in:
committed by
GitHub
parent
5d1f6ca963
commit
844b7a7a2b
@@ -227,7 +227,11 @@ export class FileService extends AbstractService implements FilesClientInterface
|
||||
vault && vault.isSharedVaultListing() ? 'shared-vault' : 'user',
|
||||
)
|
||||
|
||||
if (isErrorResponse(uploadSessionStarted) || !uploadSessionStarted.data.uploadId) {
|
||||
if (isErrorResponse(uploadSessionStarted)) {
|
||||
return ClientDisplayableError.FromNetworkError(uploadSessionStarted)
|
||||
}
|
||||
|
||||
if (!uploadSessionStarted.data.uploadId) {
|
||||
return new ClientDisplayableError('Could not start upload session')
|
||||
}
|
||||
|
||||
@@ -259,6 +263,10 @@ export class FileService extends AbstractService implements FilesClientInterface
|
||||
operation.vault && operation.vault.isSharedVaultListing() ? 'shared-vault' : 'user',
|
||||
)
|
||||
|
||||
if (uploadSessionClosed instanceof ClientDisplayableError) {
|
||||
return uploadSessionClosed
|
||||
}
|
||||
|
||||
if (!uploadSessionClosed) {
|
||||
return new ClientDisplayableError('Could not close upload session')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user