I suggest to replace this side-effect with a return value and leave the decision on where to push this error on caller