fix exception if response is not successful

Dear Maxim

Please aware that get_and_response returns an Array, so the above fix is not gonna work .