This function is called if an error occurs in the data access function.
The function is named after the method to which it belongs, prefixed with onFail, e.g. onFailread.