we could offer `raise_on_error` as an argument to this function (set to `True` by default).