minder
minder copied to clipboard
Provide more fine-grained error information when profile/ruletype name validation fails
Please describe the enhancement
See: https://github.com/stacklok/minder/pull/2945
Minder enforces certain rules about the names of profiles and rule types. Right now, if that validation fails, a generic error is returned:
name may only contain letters, numbers, hyphens and underscores, and is limited to a maximum of 63 characters
It would be useful if we returned the exact problem that the profile name has triggered. This will help customers (or indeed our own internal use of the API) figure out what is wrong their name and fix it.
Solution Proposal
Replace the current regex with some kind of parsing logic which iterates over the string and looks for violation of the naming rules.
Describe alternatives you've considered
No response
Additional context
No response
Acceptance Criteria
No response