add guard on return_message

So I had some specs in my code where I logged the return message. It gives me an error:
TypeError: no implicit conversion from nil to integer

the reason is that when stubbing typhoeus there is no return_code, so return_message fails.

This PR adds a check to use the return_code only if it exists