diff --git a/cmd/statusd/library.go b/cmd/statusd/library.go index 67d3b0a79..d0ae27ad7 100644 --- a/cmd/statusd/library.go +++ b/cmd/statusd/library.go @@ -378,15 +378,13 @@ func makeJSONResponse(err error) *C.char { func Notify(token *C.char) *C.char { err := statusAPI.Notify(C.GoString(token)) - res := true errString := "" if err != nil { - res = false errString = err.Error() } out := common.NotifyResult{ - Status: res, + Status: err == nil, Error: errString, } diff --git a/geth/common/types.go b/geth/common/types.go index 1a7c9f884..5ecccf2d9 100644 --- a/geth/common/types.go +++ b/geth/common/types.go @@ -398,7 +398,7 @@ type TestConfig struct { // NotifyResult is a JSON returned from notify message type NotifyResult struct { Status bool `json:"status"` - Error string `json:"error"` + Error string `json:"error,omitempty"` } // LoadTestConfig loads test configuration values from disk