onError

Runs action with the error if this is an Error, then returns this result.