]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java
Extract AccountHelper
[signal-cli] / src / main / java / org / asamk / signal / dbus / DbusSignalImpl.java
index f22f08a6ed84b65ea2f0c21c23d31f1ee09925e8..003f6695bd1eddcd18a74e0fc763c22524c56312 100644 (file)
@@ -669,6 +669,8 @@ public class DbusSignalImpl implements Signal {
             m.setRegistrationLockPin(Optional.empty());
         } catch (IOException e) {
             throw new Error.Failure("Remove pin error: " + e.getMessage());
+        } catch (NotMasterDeviceException e) {
+            throw new Error.Failure("This command doesn't work on linked devices.");
         }
     }
 
@@ -678,6 +680,8 @@ public class DbusSignalImpl implements Signal {
             m.setRegistrationLockPin(Optional.of(registrationLockPin));
         } catch (IOException e) {
             throw new Error.Failure("Set pin error: " + e.getMessage());
+        } catch (NotMasterDeviceException e) {
+            throw new Error.Failure("This command doesn't work on linked devices.");
         }
     }