handle API errors and attempt user details