Unit Testing HTTP Client error response

Thanks for the reply.

I learnt something new reading that!

However, I did use the exVCR stub functionality and creating custom cassettes. However, I need to test on the {:error, _} match from the HTTPoison.get response not the details of the response itself.

I guess the above methods I originally mentioned are the only ways unless I change the interface for the API, ie just returning the HTTPoison.response instead of the html