AwsSecretsManagerEnvironmentRepository reads secrets as
GetSecretValueRequest.builder().secretId(path).versionStage(label).build()
When secret does not exist it throws ResourceNotFoundException which is handled by catch block. However when secret is marked for deletion it throws InvalidRequestException which is not handled and the whole request to Config Sever fails.
HTTP/1.1 500
{
"timestamp": "2023-11-06T08:12:00.040+00:00",
"status": 500,
"error": "Internal Server Error",
"message": "You can't perform this operation on the secret because it was marked for deletion. (Service: SecretsManager, Status Code: 400, Request ID: ...)",
"path": "..."
}
AwsSecretsManagerEnvironmentRepositoryreads secrets asWhen secret does not exist it throws
ResourceNotFoundExceptionwhich is handled bycatchblock. However when secret is marked for deletion it throwsInvalidRequestExceptionwhich is not handled and the whole request to Config Sever fails.