diff --git a/rpc/middleware/middleware_test.go b/rpc/middleware/middleware_test.go index a02b42c5b..daadcffa7 100644 --- a/rpc/middleware/middleware_test.go +++ b/rpc/middleware/middleware_test.go @@ -76,12 +76,12 @@ func TestStatusMiddleware(t *testing.T) { { healthy: nil, expectedStatus: http.StatusOK, - expectedMessage: "{\"jsonrpc\":\"2.0\",\"result\":{\"isHealthy\":true,:\"error\":\"\"},\"id\":-1}", + expectedMessage: "{\"jsonrpc\":\"2.0\",\"result\":{\"isHealthy\":true,\"error\":\"\"},\"id\":-1}", }, { healthy: errors.New("node unhealthy"), expectedStatus: http.StatusOK, - expectedMessage: "{\"jsonrpc\":\"2.0\",\"result\":{\"isHealthy\":false,:\"error\":\"node unhealthy\"},\"id\":-1}", + expectedMessage: "{\"jsonrpc\":\"2.0\",\"result\":{\"isHealthy\":false,\"error\":\"node unhealthy\"},\"id\":-1}", }, } diff --git a/rpc/middleware/status.go b/rpc/middleware/status.go index 3b16af062..01e16e559 100644 --- a/rpc/middleware/status.go +++ b/rpc/middleware/status.go @@ -24,7 +24,7 @@ func (s Status) Handler(logger log.Logger) HandlerFunc { if err != nil { errS = err.Error() } - json := `{"jsonrpc":"2.0","result":{"isHealthy":` + strconv.FormatBool(isHealthy) + `,:"error":"` + errS + `"},"id":-1}` + json := `{"jsonrpc":"2.0","result":{"isHealthy":` + strconv.FormatBool(isHealthy) + `,"error":"` + errS + `"},"id":-1}` _, err = w.Write([]byte(json)) if err != nil { return