Improve error handling

This commit is contained in:
Arturo Filastò 2020-02-05 18:28:10 +01:00
parent b22f224ad3
commit cf21fd1fd8

View File

@ -68,6 +68,8 @@ func GetMeasurementJSON(sess sqlbuilder.Database, measurementID int64) (map[stri
return nil, err
}
if err := json.Unmarshal(b, &msmtJSON); err != nil {
log.Error("failed to unmarshal the measurement_json")
log.Error("backup your OONI_HOME and run `ooniprobe reset`")
return nil, err
}
return msmtJSON, nil