-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[aws-route53] Improve error message when domain for hosted zone is undefined #10053
Comments
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Are you planning to update this, or won't it be an issue with CDK v2 anymore? |
…` is undefined (#21596) If TypeScript compiler option `strictPropertyInitialization` is set to `false`, it is possible to pass an undefined value to the `fromLookup` method in `HostedZone`. Currently the error message `Cannot read property 'endsWith' of undefined` will be displayed. This error message does not indicate the root cause, so it is difficult to fix the problem. This fix introduces an additional check that shows an appropriate error message. Fixes #10053. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…` is undefined (aws#21596) If TypeScript compiler option `strictPropertyInitialization` is set to `false`, it is possible to pass an undefined value to the `fromLookup` method in `HostedZone`. Currently the error message `Cannot read property 'endsWith' of undefined` will be displayed. This error message does not indicate the root cause, so it is difficult to fix the problem. This fix introduces an additional check that shows an appropriate error message. Fixes aws#10053. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
#:question: General Issue
I tried to deploy a stack that had the following code:
I had an error there, as I should have accessed the local variable, and not the construct variable
domain
.It took me however quite long to find this issue, because the error message didn't give me much information.
Figuring out this problem through the source code is not possible, as the mapping files for
exec.ts
don't seem to contain anyendsWith
.The Question
Could you add some sanity checks that lead to a more descriptive error message?
Environment
The text was updated successfully, but these errors were encountered: