fixed exception when a non-200 response is handled