fixed bad http response, error hook