Fix error handling in case of an unsupported algorithm parameter in

SshAuthenticationService
This commit is contained in:
Christian Hagau 2017-11-12 00:00:00 +00:00
parent a9e7682985
commit 12fdb111c9

View file

@ -273,8 +273,8 @@ public class SshAuthenticationService extends Service {
return createExceptionErrorResult(SshAuthenticationApiError.NO_AUTH_KEY,
"Authentication key for master key id not found in keychain", e);
} catch (NoSuchAlgorithmException e) {
return createExceptionErrorResult(SshAuthenticationApi.RESULT_CODE_ERROR,
"", e);
return createExceptionErrorResult(SshAuthenticationApiError.INVALID_ALGORITHM,
"Algorithm not supported", e);
}
} else {
return createErrorResult(SshAuthenticationApiError.NO_KEY_ID,