When a scientist runs an experiment, there are all sorts of results that could happen. Some results are positive and some are negative, but all of them are data points. Each result is a piece of data that can ultimately lead to an answer.
And that’s exactly how a scientist treats failure: as another data point.
Rightness is a function of the mistakes you make.