Skip to content

Commit

Permalink
Change internal server error by bad request errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdiazlo committed Apr 10, 2019
1 parent 066b569 commit 4810039
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/apihttp/apihttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,13 @@ func Incremental(balloon raftwal.RaftBalloonApi) http.HandlerFunc {
// Wait for the response
proof, err := balloon.QueryConsistency(request.Start, request.End)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
http.Error(w, err.Error(), http.StatusBadRequest)
return
}

out, err := json.Marshal(protocol.ToIncrementalResponse(proof))
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
http.Error(w, err.Error(), http.StatusBadRequest)
return
}

Expand Down

0 comments on commit 4810039

Please sign in to comment.