mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Improve error handling of getUserStatus command for invalid phonen numbers
This commit is contained in:
parent
166bec0f8d
commit
5d23b1ed9d
2 changed files with 6 additions and 2 deletions
|
@ -105,7 +105,7 @@ public class RecipientHelper {
|
||||||
.getRegisteredUsers(ServiceConfig.getIasKeyStore(),
|
.getRegisteredUsers(ServiceConfig.getIasKeyStore(),
|
||||||
numbers,
|
numbers,
|
||||||
serviceEnvironmentConfig.getCdsMrenclave());
|
serviceEnvironmentConfig.getCdsMrenclave());
|
||||||
} catch (Quote.InvalidQuoteFormatException | UnauthenticatedQuoteException | SignatureException | UnauthenticatedResponseException | InvalidKeyException e) {
|
} catch (Quote.InvalidQuoteFormatException | UnauthenticatedQuoteException | SignatureException | UnauthenticatedResponseException | InvalidKeyException | NumberFormatException e) {
|
||||||
throw new IOException(e);
|
throw new IOException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,11 @@ public class GetUserStatusCommand implements JsonRpcLocalCommand {
|
||||||
try {
|
try {
|
||||||
registered = m.areUsersRegistered(new HashSet<>(ns.getList("recipient")));
|
registered = m.areUsersRegistered(new HashSet<>(ns.getList("recipient")));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new IOErrorException("Unable to check if users are registered", e);
|
throw new IOErrorException("Unable to check if users are registered: "
|
||||||
|
+ e.getMessage()
|
||||||
|
+ " ("
|
||||||
|
+ e.getClass().getSimpleName()
|
||||||
|
+ ")", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue