update db class error handling