Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizencc authored Dec 22, 2023
1 parent ef8e34f commit b9c1f34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-ses/lib/dedicated-ip-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class DedicatedIpPool extends Resource implements IDedicatedIpPool {
});

if (props.dedicatedIpPoolName && !/^[a-z0-9_-]{0,64}$/.test(props.dedicatedIpPoolName)) {
throw new Error('Invalid dedicatedIpPoolName. The name must only include lowercase letters, numbers, underscores, hyphens, and must not exceed 64 characters.');
throw new Error(`Invalid dedicatedIpPoolName "${props.dedicatedIpPoolName}". The name must only include lowercase letters, numbers, underscores, hyphens, and must not exceed 64 characters.`);
}

const pool = new CfnDedicatedIpPool(this, 'Resource', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ test('dedicated IP pool with invalid name', () => {
// THEN
expect(() => new DedicatedIpPool(stack, 'Pool', {
dedicatedIpPoolName: 'invalidName',
})).toThrow('Invalid dedicatedIpPoolName. The name must only include lowercase letters, numbers, underscores, hyphens, and must not exceed 64 characters.');
})).toThrow('Invalid dedicatedIpPoolName "invalidName". The name must only include lowercase letters, numbers, underscores, hyphens, and must not exceed 64 characters.');
});

0 comments on commit b9c1f34

Please sign in to comment.