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

Not a very useful error message "Message:Error generating canonicalized entry" #362

Closed
sylvestre opened this issue Jul 10, 2021 · 0 comments · Fixed by #377
Closed

Not a very useful error message "Message:Error generating canonicalized entry" #362

sylvestre opened this issue Jul 10, 2021 · 0 comments · Fixed by #377

Comments

@sylvestre
Copy link
Contributor

This is probably an issue on my side but the error message isn't helpful for me to debug

$ rekor upload --rekor_server https://rekor.sigstore.dev --signature llvm-toolchain-12_12.0.1~+rc4-1_amd64.changes  --public-key /tmp/a.key --artifact llvm-toolchain-12_12.0.1~+rc4-1_amd64.changes
2021/07/10 09:40:05 [POST /api/v1/log/entries][500] createLogEntry default  &{Code:500 Message:Error generating canonicalized entry}

Seems to be coming from:

rekor/pkg/api/entries.go

Lines 138 to 141 in 9fa4e20

leaf, err := entry.Canonicalize(ctx)
if err != nil {
return nil, handleRekorAPIError(params, http.StatusInternalServerError, err, failedToGenerateCanonicalEntry)
}

bobcallaway referenced this issue in bobcallaway/rekor Jul 17, 2021
Previously we returned an HTTP 500 "error canonicalizing entry" error if
Rekor was unable to parse or verify the proposed content of a new log
entry. This adds a new error type ValidationError that allows
implementers of the Canonicalize method to delineate between internal,
transient errors and errors that clients can rectify.

With this patch, errors parsing or validating (provided or referenced)
artifacts will return an HTTP 400 message to the client with a message
about the issue.

Fixes: #362

Signed-off-by: Bob Callaway <[email protected]>
dlorenc pushed a commit that referenced this issue Jul 17, 2021
Previously we returned an HTTP 500 "error canonicalizing entry" error if
Rekor was unable to parse or verify the proposed content of a new log
entry. This adds a new error type ValidationError that allows
implementers of the Canonicalize method to delineate between internal,
transient errors and errors that clients can rectify.

With this patch, errors parsing or validating (provided or referenced)
artifacts will return an HTTP 400 message to the client with a message
about the issue.

Fixes: #362

Signed-off-by: Bob Callaway <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant