diff --git a/packages/@aws-cdk/aws-glue-alpha/lib/database.ts b/packages/@aws-cdk/aws-glue-alpha/lib/database.ts index c78e6fcaa5ea8..6b208b3fdfecd 100644 --- a/packages/@aws-cdk/aws-glue-alpha/lib/database.ts +++ b/packages/@aws-cdk/aws-glue-alpha/lib/database.ts @@ -145,12 +145,12 @@ export class Database extends Resource implements IDatabase { function validateLocationUri(locationUri: string): void { if (locationUri.length < 1 || locationUri.length > 1024) { - throw new Error(`locationUri length must be (inclusively) between 1 and 1024, but was ${locationUri.length}`); + throw new Error(`locationUri length must be (inclusively) between 1 and 1024, got ${locationUri.length}`); } } function validateDescription(description: string): void { if (description.length > 2048) { - throw new Error(`description length must be less than or equal to 2048, but was ${description.length}`); + throw new Error(`description length must be less than or equal to 2048, got ${description.length}`); } } diff --git a/packages/@aws-cdk/aws-glue-alpha/test/database.test.ts b/packages/@aws-cdk/aws-glue-alpha/test/database.test.ts index 7f73fb9a1f276..2379c07071808 100644 --- a/packages/@aws-cdk/aws-glue-alpha/test/database.test.ts +++ b/packages/@aws-cdk/aws-glue-alpha/test/database.test.ts @@ -108,7 +108,7 @@ test('locationUri length must be <= 1024', () => { new glue.Database(stack, 'Database', { locationUri: 'a'.repeat(1025), }), - ).toThrow(); + ).toThrow('locationUri length must be (inclusively) between 1 and 1024, got 1025'); }); test('description length must be <= 2048', () => { @@ -116,7 +116,7 @@ test('description length must be <= 2048', () => { new glue.Database(stack, 'Database', { description: 'a'.repeat(2049), }), - ).toThrow(); + ).toThrow('description length must be less than or equal to 2048, got 2049'); }); test('can specify a physical name', () => {