records: fix for test_error_catching
Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com> Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>