Skip to content
Snippets Groups Projects
  • Bob Callaway's avatar
    5e005eb1
    Improve error messages for invalid content (#377) · 5e005eb1
    Bob Callaway authored
    
    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: default avatarBob Callaway <bob.callaway@gmail.com>
    Improve error messages for invalid content (#377)
    Bob Callaway authored
    
    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: default avatarBob Callaway <bob.callaway@gmail.com>