Again since I can't test it by myself would need a little more information in order to make cleanup. 

According to the current code, if there is any response from the server is it an error? Isn't there anyway to distinguish if the query has been successful, or probably successful? 

On the other hand, since there is an error printing if there is any response should I assume the query has been good if there isn't any response from the server? Need clarification, please.