Updated new error handling for both data ret fns

Also updated unit tests. Now Travis should build correctly again.