fix crash when response got error