Skip to content

Commit 79106ef

Browse files
authored
fix: Use correct exception type for fallback at file/folder pulling (appium#1912)
1 parent 53d0f68 commit 79106ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/io/appium/java_client/PullsFiles.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package io.appium.java_client;
1818

1919
import com.google.common.collect.ImmutableMap;
20+
import org.openqa.selenium.UnsupportedCommandException;
2021

2122
import java.nio.charset.StandardCharsets;
2223
import java.util.AbstractMap;
@@ -49,7 +50,7 @@ default byte[] pullFile(String remotePath) {
4950
ImmutableMap.of("remotePath", remotePath)
5051
)
5152
);
52-
} catch (UnsupportedOperationException e) {
53+
} catch (UnsupportedCommandException e) {
5354
// TODO: Remove the fallback
5455
base64String = checkNotNull(
5556
CommandExecutionHelper.execute(markExtensionAbsence(extName),
@@ -81,7 +82,7 @@ default byte[] pullFolder(String remotePath) {
8182
ImmutableMap.of("remotePath", remotePath)
8283
)
8384
);
84-
} catch (UnsupportedOperationException e) {
85+
} catch (UnsupportedCommandException e) {
8586
// TODO: Remove the fallback
8687
base64String = checkNotNull(
8788
CommandExecutionHelper.execute(markExtensionAbsence(extName),

0 commit comments

Comments
 (0)