Skip to content

Commit

Permalink
change error messages for the review
Browse files Browse the repository at this point in the history
  • Loading branch information
go-to-k committed Sep 13, 2023
1 parent 56d8238 commit d3d0b2b
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-cloudwatch/lib/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class Dashboard extends Resource {
}

if (props.end !== undefined && props.start === undefined) {
throw new Error('You must also specify a start if you specify an end');
throw new Error('If you specify a value for end, you must also specify a value for start.');
}

const dashboard = new CfnDashboard(this, 'Resource', {
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-cloudwatch/test/dashboard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ describe('Dashboard', () => {
};

// THEN
expect(() => toThrow()).toThrow(/You must also specify a start if you specify an end/);
expect(() => toThrow()).toThrow(/If you specify a value for end, you must also specify a value for start./);
});

test('DashboardName is set when provided', () => {
Expand Down

0 comments on commit d3d0b2b

Please sign in to comment.