Added the logging for errors encountered in configuration decryption workflow

This commit is contained in:
VakarisZ 2021-06-11 16:25:47 +03:00
parent fbe9b4f4d7
commit 8a673cc76c
1 changed files with 3 additions and 0 deletions

View File

@ -75,6 +75,9 @@ class ConfigurationImport(flask_restful.Resource):
config = decrypt_ciphertext(config, request_contents["password"])
return json.loads(config)
except (JSONDecodeError, InvalidCiphertextError):
logger.exception(
"Exception encountered when trying " "to extract plaintext configuraiton."
)
raise InvalidConfigurationError
@staticmethod