minder icon indicating copy to clipboard operation
minder copied to clipboard

Provide more fine-grained error information when profile/ruletype name validation fails

Open dmjb opened this issue 1 year ago • 0 comments

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

dmjb avatar Apr 04 '24 17:04 dmjb