Fix incorrect handle of errors in the datastore helpers