customer details api error handling fix