notaryproject / notation-go

A collection of libraries for supporting sign and verify OCI artifacts. Based on Notary Project specifications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

trust store validation error message needs improvement

JeyJeyGao opened this issue · comments

The trust store validation error message needs improvement. Here is the code.

storeType, name, found := strings.Cut(trustStore, ":")
if !found {
	return nil, fmt.Errorf("trust policy statement %q is missing separator in trust store value %q", policy.Name, trustStore)
}

We had better provide a valid trust store format to help user figure out the value. We can add "Format : is required" to the end of the error message.

To be more specific, we could say Format <TrustStoreType>:<TrustStoreName> is required