-
Notifications
You must be signed in to change notification settings - Fork 66
Closed
Labels
feature/service-registrypriority/important-soonMust be staffed and worked on either currently or very soon—ideally in time for the next release. ImMust be staffed and worked on either currently or very soon—ideally in time for the next release. Im
Description
Approach 1
Special error types would be perhaps be needed which are scoped to the data plane CLI.
From data plane CLI, keep it simple with no reference to what command you should use:
var NoRegistrySelectedError = errors.New("no service registry selected")
return NoRegistrySelectedErrorWhen interpreting the error, add additional info:
if rerr, ok := err.(*NoRegistrySelectedError); ok {
return fmt.Errorf("%w: use 'rhoas service-registry use' to select a registry or pass the `--registry-id` flag")
}That is a simplistic approach which does not scale very well, but perhaps some kind of abstraction would be helpful to match errors.
Originally posted by @craicoverflow in #859 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature/service-registrypriority/important-soonMust be staffed and worked on either currently or very soon—ideally in time for the next release. ImMust be staffed and worked on either currently or very soon—ideally in time for the next release. Im