diff --git a/common/errorMessages.js b/common/errorMessages.js index dbfad274..f8fe38d2 100644 --- a/common/errorMessages.js +++ b/common/errorMessages.js @@ -5,5 +5,6 @@ module.exports = { 'Incorrect Okta username/password or MFA is enabled. Please, check credentials or use the "Identity Provider SSO (via external browser)" for MFA auth', OKTA_MFA_ERROR: 'Native Okta auth doesn\'t support MFA. Please, use the "Identity Provider SSO (via external browser)" auth instead', - KEY_PAIR_ERROR: 'Please check that the passphrase is provided and matches the key.', + KEY_PAIR_PASSPHRASE_ERROR: 'Please check that the passphrase is provided and matches the key.', + KEY_PAIR_USERNAME_ERROR: 'Incorrect username was specified.', }; diff --git a/common/getKeyPairConnectionErrorMessageByCode.js b/common/getKeyPairConnectionErrorMessageByCode.js index 86ad8a83..8c26de0b 100644 --- a/common/getKeyPairConnectionErrorMessageByCode.js +++ b/common/getKeyPairConnectionErrorMessageByCode.js @@ -2,9 +2,9 @@ const errorMessages = require('./errorMessages.js'); const errorCodes = require('./errorCodes.js'); const ERROR_CODE_TO_MESSAGE = { - [errorCodes.ERR_MISSING_PASSPHRASE]: errorMessages.KEY_PAIR_ERROR, - [errorCodes.ERR_OSSL_BAD_DECRYPT]: errorMessages.KEY_PAIR_ERROR, - [errorCodes.ERR_INVALID_USERNAME]: errorMessages.KEY_PAIR_ERROR, + [errorCodes.ERR_MISSING_PASSPHRASE]: errorMessages.KEY_PAIR_PASSPHRASE_ERROR, + [errorCodes.ERR_OSSL_BAD_DECRYPT]: errorMessages.KEY_PAIR_PASSPHRASE_ERROR, + [errorCodes.ERR_INVALID_USERNAME]: errorMessages.KEY_PAIR_USERNAME_ERROR, }; const getKeyPairConnectionErrorMessageByCode = code => ERROR_CODE_TO_MESSAGE[code];