fix: ensure experiments return nil when we want to submit (#654)
Since https://github.com/ooni/probe-cli/pull/527, if an experiment returns an error, the corresponding measurement is not submitted since the semantics of returning an error is that something fundamental went wrong (e.g., we could not parse the input URL). This diff ensures that all experiments only return and error when something fundamental was wrong and return nil otherwise. Reference issue: https://github.com/ooni/probe/issues/1808.
This commit is contained in:
@@ -105,7 +105,7 @@ type ExperimentMeasurer interface {
|
||||
// return an error in case the experiment could not run (e.g.,
|
||||
// a required input is missing). Otherwise, the code should just
|
||||
// set the relevant OONI error inside of the measurement and
|
||||
// return nil. This is important because the caller may not submit
|
||||
// return nil. This is important because the caller WILL NOT submit
|
||||
// the measurement if this method returns an error.
|
||||
Run(
|
||||
ctx context.Context, sess ExperimentSession,
|
||||
|
||||
Reference in New Issue
Block a user