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
@@ -821,7 +821,10 @@ export class LegacyApiService
|
||||
return response.data.success
|
||||
}
|
||||
|
||||
public async closeUploadSession(valetToken: string, ownershipType: FileOwnershipType): Promise<boolean> {
|
||||
public async closeUploadSession(
|
||||
valetToken: string,
|
||||
ownershipType: FileOwnershipType,
|
||||
): Promise<boolean | ClientDisplayableError> {
|
||||
const url = joinPaths(
|
||||
this.getFilesHost(),
|
||||
ownershipType === 'user' ? Paths.v1.closeUploadSession : Paths.v1.closeSharedVaultUploadSession,
|
||||
@@ -835,7 +838,7 @@ export class LegacyApiService
|
||||
})
|
||||
|
||||
if (isErrorResponse(response)) {
|
||||
return false
|
||||
return ClientDisplayableError.FromNetworkError(response)
|
||||
}
|
||||
|
||||
return response.data.success
|
||||
|
||||
Reference in New Issue
Block a user