This repository was archived by the owner on Mar 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/org/cryptomator/cloudaccess Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 99import org .cryptomator .cloudaccess .api .ProgressListener ;
1010import org .cryptomator .cloudaccess .api .Quota ;
1111import org .cryptomator .cloudaccess .api .exceptions .NotFoundException ;
12+ import org .cryptomator .cloudaccess .api .exceptions .QuotaNotAvailableException ;
1213
1314import java .io .InputStream ;
1415import java .time .Duration ;
@@ -65,14 +66,14 @@ public CompletionStage<Quota> quota(CloudPath folder) {
6566 if (cachedMetadata != null ) {
6667 return cachedMetadata //
6768 .map (CompletableFuture ::completedFuture ) //
68- .orElseGet (() -> CompletableFuture .failedFuture (new NotFoundException ()));
69+ .orElseGet (() -> CompletableFuture .failedFuture (new QuotaNotAvailableException ()));
6970 } else {
7071 return delegate .quota (folder ) //
7172 .whenComplete ((quota , exception ) -> {
7273 if (exception == null ) {
7374 assert quota != null ;
7475 quotaCache .put (folder , Optional .of (quota ));
75- } else if (exception instanceof NotFoundException ) {
76+ } else if (exception instanceof NotFoundException || exception instanceof QuotaNotAvailableException ) {
7677 quotaCache .put (folder , Optional .empty ());
7778 } else {
7879 quotaCache .invalidate (folder );
You can’t perform that action at this time.
0 commit comments