potiuk commented on code in PR #24898:
URL: https://github.com/apache/airflow/pull/24898#discussion_r916353226
##########
airflow/providers/amazon/aws/secrets/secrets_manager.py:
##########
@@ -257,15 +258,32 @@ def _get_secret(self, path_prefix, secret_id: str) ->
Optional[str]:
return response.get('SecretString')
except self.client.exceptions.ResourceNotFoundException:
self.log.debug(
- "An error occurred (ResourceNotFoundException) when calling
the "
- "get_secret_value operation: "
+ f"ResourceNotFoundException: {error_msg}: "
"Secret %s not found.",
secret_id,
)
return None
- except self.client.exceptions.AccessDeniedException:
+ except self.client.exceptions.InvalidParameterException:
self.log.debug(
- "An error occurred (AccessDeniedException) when calling the
get_secret_value operation",
+ f"InvalidParameterException: {error_msg}",
+ exc_info=True,
+ )
+ return None
+ except self.client.exceptions.InvalidRequestException:
+ self.log.debug(
+ f"InvalidRequestException: {error_msg}",
Review Comment:
Right!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]