Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type the No valid trust data error #1212

Merged
merged 1 commit into from Aug 17, 2017

Conversation

@eiais
Copy link
Contributor

commented Aug 14, 2017

Signed-off-by: Kyle Spiers kyle@spiers.me

@eiais eiais force-pushed the eiais:type-trust-error branch from a2d1f28 to 9ba9fa1 Aug 14, 2017

@@ -595,6 +595,12 @@ type TargetSignedStruct struct {
Signatures []data.Signature
}

type NoValidTrustDataError string

This comment has been minimized.

Copy link
@cyli

cyli Aug 14, 2017

Contributor

Do we want to name this something more like NoSuchTarget? Because there is already a ErrRepositoryNotExist which returns text similar to "... does not have trust data for ...", and the error type name would be clearer I think. Similarly, would be nice if we could say something like "No valid trust data for target %s" instead.

@cyli

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2017

Can we also return the same error in GetTargetByName? The error text is currently slightly different, but that function and GetAllTargetMetadataByName should probably return the same error type for the same failure.

@eiais eiais force-pushed the eiais:type-trust-error branch from 9ba9fa1 to dcf80c2 Aug 14, 2017

@@ -595,6 +595,12 @@ type TargetSignedStruct struct {
Signatures []data.Signature
}

type ErrNoSuchTarget string

This comment has been minimized.

Copy link
@cyli

cyli Aug 14, 2017

Contributor

There seems to be a lint error because this error doesn't have a comment. (You can verify with make lint).

@cyli
cyli approved these changes Aug 14, 2017
Copy link
Contributor

left a comment

Other than the linting issue, this LGTM on green.

@ashfall
Copy link
Contributor

left a comment

LGTM on green

@eiais eiais force-pushed the eiais:type-trust-error branch from dcf80c2 to f7d1150 Aug 15, 2017

type the No valid trust data error
Signed-off-by: Kyle Spiers <kyle@spiers.me>

@eiais eiais force-pushed the eiais:type-trust-error branch from f7d1150 to 252a716 Aug 17, 2017

@cyli cyli merged commit e8ee47e into theupdateframework:master Aug 17, 2017

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/project 80.65% (-0.02%) compared to 19635cd
Details
dco-signed All commits are signed
test with yubikey hardware tests succeeded with yubikey hardware
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.