Skip to content
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

fix: Deduplicate error message in InvalidResourceException #2748

Merged
merged 1 commit into from
Dec 16, 2022

Conversation

aahung
Copy link
Contributor

@aahung aahung commented Dec 16, 2022

Issue #, if available

This also make optional dict PropertyType sam_resources.py all with better validation error messages.

Description of changes

Description of how you validated changes

Checklist

Examples?

Please reach out in the comments if you want to add an example. Examples will be
added to sam init through aws/aws-sam-cli-app-templates.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@aahung aahung requested a review from a team as a code owner December 16, 2022 21:17
@aahung aahung enabled auto-merge (squash) December 16, 2022 21:18
@aahung aahung merged commit d52afe2 into aws:develop Dec 16, 2022
@aahung aahung deleted the deduplicate-errors branch December 16, 2022 21:24
Comment on lines 110 to +111
"Events": PropertyType(False, dict_of(is_str(), is_type(dict))),
"Tags": PropertyType(False, is_type(dict)),
"Tags": PropertyType.optional_dict(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this harder to read.

Now we have a mix of PropertyType(... is_type(dict)), PropertyType.optional_dict(), etc. It's clear what this all is, why pick one over there, or why optional dicts are special.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, need a follow up to replace others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants