Skip to content

Commit 2dbb381

Browse files
authored
fix(rds): incorrect error message for rds proxies (#29404)
Closes #29402. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 110c79f commit 2dbb381

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/aws-cdk-lib/aws-rds/lib/proxy.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ export class ProxyTarget {
104104

105105
const engineFamily = engine.engineFamily;
106106
if (!engineFamily) {
107-
throw new Error(`Engine '${engineDescription(engine)}' does not support proxies`);
107+
throw new Error('RDS proxies require an engine family to be specified on the database cluster or instance. ' +
108+
`No family specified for engine '${engineDescription(engine)}'`);
108109
}
109110

110111
// allow connecting to the Cluster/Instance from the Proxy

packages/aws-cdk-lib/aws-rds/test/proxy.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ describe('proxy', () => {
203203
vpc,
204204
secrets: [new secretsmanager.Secret(stack, 'Secret')],
205205
});
206-
}).toThrow(/Engine 'mariadb-10\.0\.24' does not support proxies/);
206+
}).toThrow(/RDS proxies require an engine family to be specified on the database cluster or instance. No family specified for engine 'mariadb-10\.0\.24'/);
207207
});
208208

209209
test('correctly creates a proxy for an imported Cluster if its engine is known', () => {

0 commit comments

Comments
 (0)