Fix error type for dbus rate limit challenge

This commit is contained in:
AsamK 2021-11-06 15:41:58 +01:00
parent 2ab42ca547
commit eec7aec069
2 changed files with 3 additions and 5 deletions

View file

@ -2,7 +2,6 @@ package org.asamk.signal.dbus;
import org.asamk.Signal;
import org.asamk.signal.BaseConfig;
import org.asamk.signal.commands.exceptions.IOErrorException;
import org.asamk.signal.manager.AttachmentInvalidException;
import org.asamk.signal.manager.Manager;
import org.asamk.signal.manager.NotMasterDeviceException;
@ -90,13 +89,13 @@ public class DbusSignalImpl implements Signal {
}
@Override
public void submitRateLimitChallenge(String challenge, String captchaString) throws IOErrorException {
public void submitRateLimitChallenge(String challenge, String captchaString) {
final var captcha = captchaString == null ? null : captchaString.replace("signalcaptcha://", "");
try {
m.submitRateLimitRecaptchaChallenge(challenge, captcha);
} catch (IOException e) {
throw new IOErrorException("Submit challenge error: " + e.getMessage(), e);
throw new Error.Failure("Submit challenge error: " + e.getMessage());
}
}