Skip to content

Commit 3d24571

Browse files
committed
Add details to exception.
1 parent 6b73fc7 commit 3d24571

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hub/src/main/java/cloud/katta/protocols/hub/HubVaultListService.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import ch.cyberduck.core.Host;
99
import ch.cyberduck.core.ListProgressListener;
1010
import ch.cyberduck.core.ListService;
11+
import ch.cyberduck.core.LocaleFactory;
1112
import ch.cyberduck.core.OAuthTokens;
1213
import ch.cyberduck.core.Path;
1314
import ch.cyberduck.core.PathAttributes;
@@ -29,6 +30,7 @@
2930
import org.apache.logging.log4j.Logger;
3031
import org.cryptomator.cryptolib.api.UVFMasterkey;
3132

33+
import java.text.MessageFormat;
3234
import java.util.EnumSet;
3335

3436
import cloud.katta.client.ApiException;
@@ -130,6 +132,7 @@ public void preflight(final Path directory) throws BackgroundException {
130132
return;
131133
}
132134
log.warn("Deny directory listing with no vault available for {}", directory);
133-
throw new AccessDeniedException();
135+
throw new AccessDeniedException(MessageFormat.format(LocaleFactory.localizedString("Listing directory {0} failed", "Error"),
136+
directory.getName())).withFile(directory);
134137
}
135138
}

0 commit comments

Comments
 (0)