Better logging for registration failure

This commit is contained in:
AsamK 2023-05-21 11:15:49 +02:00
parent c9082a63f0
commit a754eb6faf
2 changed files with 17 additions and 10 deletions

View file

@ -92,7 +92,8 @@ public class RegisterCommand implements RegistrationCommand, JsonRpcRegistration
} catch (NonNormalizedPhoneNumberException e) {
throw new UserErrorException("Failed to register: " + e.getMessage(), e);
} catch (IOException e) {
throw new IOErrorException("Failed to register: " + e.getMessage(), e);
throw new IOErrorException("Failed to register: %s (%s)".formatted(e.getMessage(),
e.getClass().getSimpleName()), e);
}
}