This repository was archived by the owner on Oct 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Display name validation is misleading #56
Copy link
Copy link
Open
Description
There are a few issues with the display name validation:
-
Display name must be prefixed with
opentelemetry/according to the regexWhy do we check for this? This is not documented indisplayNameRegex = regexp.MustCompile(`opentelemetry/.*`) go/ot-gcp-requirements -
When display name doesn't match the regex mentioned above, mock server returns the error
"displayName has max length of 128 bytes"(see), which is super misleading: we don't even check for the string length, and should have specified in the error that we expected it to be prefixed withcloud-operations-api-mock/internal/validation/statuses.go
Lines 40 to 41 in 7216ea7
statusInvalidDisplayName = status.Error(codes.InvalidArgument, fmt.Sprintf("displayName has max length of %v bytes", maxDisplayNameBytes)) opentelemetry/or something more user friendly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels