Whenever a cost.State is created using cost.NewState function, the previous behaviour was to fail it the first time an error is encountered (e.g. when no product matching the query was found.)
This PR adds a new field on Component to store the error. It is used by cost.NewState instead of returning the error from the function. The errors can then be read from a ResourceDiff by using the Errors method.
Abstract
Whenever a
cost.State
is created usingcost.NewState
function, the previous behaviour was to fail it the first time an error is encountered (e.g. when no product matching the query was found.)This PR adds a new field on
Component
to store the error. It is used bycost.NewState
instead of returning the error from the function. The errors can then be read from aResourceDiff
by using theErrors
method.Closes #17