# Unit Testing HTTP Client error response

**URL:** <https://forum.elixirforum.com/t/unit-testing-http-client-error-response/47952>\
**Category:** Questions\
**Tags:** http\_client, testing, httpoison\
**Created:** [May 24, 2022, 6:22pm UTC](https://forum.elixirforum.com/t/unit-testing-http-client-error-response/47952 "2022-05-24T18:22:09Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Bounti](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/b/6bbea6/32.png) [@Bounti](https://forum.elixirforum.com/u/Bounti)\
**Post date:** [May 24, 2022, 7:05pm UTC](https://forum.elixirforum.com/t/unit-testing-http-client-error-response/47952/3 "2022-05-24T19:05:31Z")

</div>

Yes, I don’t have an issue with the happy path but the unhappy/negative path. As the URL is static and used within the function itself, I’m unclear how to receive a HTTPoison error. Only idea is the stubbing part maybe.

---

_[View the full topic](https://forum.elixirforum.com/t/unit-testing-http-client-error-response/47952)._
