Missing clause for if pre_data returns an error; if you want it to explode in such a case you should probably document that.