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

Improve error messages for invalid content #377

Merged
merged 1 commit into from
Jul 17, 2021

Conversation

bobcallaway
Copy link
Member

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]

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 dlorenc merged commit 5e005eb into sigstore:main Jul 17, 2021
@cpanato cpanato added this to the 0.3.0 milestone Jul 17, 2021
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 this pull request may close these issues.

Not a very useful error message "Message:Error generating canonicalized entry"
3 participants