better data operation error handling