Skip to content

Cannot read properties off Secrets Manager when marked for deletion #2346

@ojecborec

Description

@ojecborec

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": "..."
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions