Fix: redshift:EnableSnapshotCopy raises incorrect Exception (#3485)
The previous code was trying to raise a botocore ClientError directly, which was actually generating a secondary AttributeError because the arguments passed to ClientError() were incorrect. This replaces the ClientError() call with a proper moto exception class for Redshift and fixes the test assertions appropriately. Supersedes #1957
This commit is contained in:
parent
689cd8f285
commit
4245497a97
2 changed files with 11 additions and 4 deletions
|
|
@ -573,10 +573,8 @@ class RedshiftBackend(BaseBackend):
|
|||
cluster.encrypted == "true"
|
||||
and kwargs["snapshot_copy_grant_name"] is None
|
||||
):
|
||||
raise ClientError(
|
||||
"InvalidParameterValue",
|
||||
"SnapshotCopyGrantName is required for Snapshot Copy "
|
||||
"on KMS encrypted clusters.",
|
||||
raise InvalidParameterValueError(
|
||||
"SnapshotCopyGrantName is required for Snapshot Copy on KMS encrypted clusters."
|
||||
)
|
||||
status = {
|
||||
"DestinationRegion": kwargs["destination_region"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue