aboutsummaryrefslogtreecommitdiff
path: root/handler.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-23 21:36:00 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-23 21:36:00 +0100
commitb2e10535ef094e8bc9995769c2a22a1ee29cbe57 (patch)
treeadce4aaef9978a04e09d24499f99752c6d2dbf8c /handler.go
parent15444f91e74de6e1ca8ea99511e8cb6dcd92fa91 (diff)
added start on isolated trillian checks
Diffstat (limited to 'handler.go')
-rw-r--r--handler.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/handler.go b/handler.go
index 839a310..f06bd74 100644
--- a/handler.go
+++ b/handler.go
@@ -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))