add error handling to customer.sql