]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/util/ErrorUtils.java
Catch ProofRequiredException from getPreKeys request and wrap in SendMessageResult
[signal-cli] / src / main / java / org / asamk / signal / util / ErrorUtils.java
index 8a3de142f7409e0e299be90369c080db580edbe9..ef1956c3f5ca72db7e426192a2b4eed972e12aa4 100644 (file)
@@ -67,7 +67,7 @@ public class ErrorUtils {
         } else if (result.getProofRequiredFailure() != null) {
             final var failure = result.getProofRequiredFailure();
             return String.format(
-                    "CAPTCHA proof required for sending to \"%s\", available options \"%s\" with token \"%s\", or wait \"%d\" seconds",
+                    "CAPTCHA proof required for sending to \"%s\", available options \"%s\" with challenge token \"%s\", or wait \"%d\" seconds",
                     identifier,
                     failure.getOptions()
                             .stream()
@@ -88,6 +88,6 @@ public class ErrorUtils {
         for (var error : errors) {
             message.append(error).append("\n");
         }
-        throw new IOErrorException(message.toString());
+        throw new IOErrorException(message.toString(), null);
     }
 }