diff options
author | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-11-23 21:36:00 +0100 |
---|---|---|
committer | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-11-23 21:36:00 +0100 |
commit | b2e10535ef094e8bc9995769c2a22a1ee29cbe57 (patch) | |
tree | adce4aaef9978a04e09d24499f99752c6d2dbf8c /handler.go | |
parent | 15444f91e74de6e1ca8ea99511e8cb6dcd92fa91 (diff) |
added start on isolated trillian checks
Diffstat (limited to 'handler.go')
-rw-r--r-- | handler.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -65,8 +65,8 @@ func addEntry(ctx context.Context, i *Instance, w http.ResponseWriter, r *http.R ExtraData: appendix, }, }) - if status, errInner := checkQueueLeaf(trsp, err); errInner != nil { - return status, fmt.Errorf("bad QueueLeafResponse: %v", errInner) + if errInner := checkQueueLeaf(trsp, err); errInner != nil { + return http.StatusInternalServerError, fmt.Errorf("bad QueueLeafResponse: %v", errInner) } sdi, err := i.LogParameters.genV1Sdi(trsp.QueuedLeaf.Leaf.LeafValue) @@ -182,8 +182,8 @@ func getSth(ctx context.Context, i *Instance, w http.ResponseWriter, _ *http.Req LogId: i.LogParameters.TreeId, }) var lr types.LogRootV1 - if status, errInner := checkGetLatestSignedLogRoot(i.LogParameters, trsp, err, &lr); errInner != nil { - return status, fmt.Errorf("bad GetLatestSignedLogRootResponse: %v", errInner) + if errInner := checkGetLatestSignedLogRoot(i.LogParameters, trsp, err, &lr); errInner != nil { + return http.StatusInternalServerError, fmt.Errorf("bad GetLatestSignedLogRootResponse: %v", errInner) } sth, err := i.LogParameters.genV1Sth(NewTreeHeadV1(&lr)) |