-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(ecr): make validateRepositoryName errors human readable #26715
Comments
For reference aws-cdk/packages/aws-cdk-lib/aws-ecr/lib/repository.ts Lines 659 to 681 in e593229
|
Yeah it makes sense to improve the error messages here. |
When a user specifies an invalid repository name, the error message will now describe why the name is invalid instead of providing the regex used to validate the name. The message comes from the console when defining a new repository. The docstring of `repositoryName` now reflects this and mirrors the docstring of the underlying CFN resource. Closes #26715. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
When a user specifies an invalid repository name, the error message will now describe why the name is invalid instead of providing the regex used to validate the name. The message comes from the console when defining a new repository. The docstring of `repositoryName` now reflects this and mirrors the docstring of the underlying CFN resource. Closes #26715. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the feature
The current errors say repository names must match a long regex. Make the errors explain why the name was not valid in an understandable way.
Use Case
Understanding why a repository name is not valid without deciphering regex.
Proposed Solution
Translate the regex into words in the error messages.
Other Information
No response
Acknowledgements
CDK version used
2.91.0
Environment details (OS name and version, etc.)
Mac
The text was updated successfully, but these errors were encountered: