We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6249ef2 commit 5a23fd0Copy full SHA for 5a23fd0
1 file changed
packages/cli/src/constructs/project.ts
@@ -235,6 +235,10 @@ export class Session {
235
}
236
237
static validateCreateConstruct (construct: Construct) {
238
+ if (typeof construct.logicalId !== 'string') {
239
+ throw new ValidationError(`The "logicalId" of a construct must be a string (logicalId=${construct.logicalId} [${typeof construct.logicalId}])`)
240
+ }
241
+
242
if (!/^[A-Za-z0-9_\-/#.]+$/.test(construct.logicalId)) {
243
throw new ValidationError(`The "logicalId" can only include the following characters: [A-Za-z0-9_-/#.]. (logicalId='${construct.logicalId}')`)
244
0 commit comments