propagate the error up to the caller instead of panic