title: (RuntimeError) expected action/2 to return a Plug.Conn, all plugs must receive a connection (conn) and return a connection
body: <p>In one of my controllers I've got the following code (excerpt):</p>
  
  <pre><code>case HTTPoison.get("https://*****.zendesk.com/api/v2/users/search.json?query=" &lt;&gt; clid, headers, [hackney: hackney]) do
    {:ok, %HTTPoison.Response{status_code: 200, body: body}} -&gt;
      conn
      |&gt; put_status(200)
      |&gt; json(body)
    {:ok, %HTTPoison.Response{status_code: 404}} -&gt;
      conn
      |&gt; put_status(404)
      |&gt; json(%{error_code: "404", reason_given: "Resource not found."})
    {:error, %HTTPoison.Error{reason: reason}} -&gt;
      conn
      |&gt; put_status(500)
      |&gt; json(%{error_code: "500", reason_given: "None."})
  end
  </code></pre>
  
  <p>When I run the code, it works fine, but Phoenix throws the runtime exception:</p>
  
  <pre><code>** (exit) an exception was raised:
      ** (RuntimeError) expected action/2 to return a Plug.Conn, all plugs must receive a connection (conn) and return a connection
          (zentonies) web/controllers/page_controller.ex:1: Zentonies.PageController.phoenix_controller_pipeline/2
          (zentonies) lib/zentonies/endpoint.ex:1: Zentonies.Endpoint.instrument/4
          (zentonies) lib/phoenix/router.ex:261: Zentonies.Router.dispatch/2
          (zentonies) web/router.ex:1: Zentonies.Router.do_call/2
          (zentonies) lib/zentonies/endpoint.ex:1: Zentonies.Endpoint.phoenix_pipeline/1
          (zentonies) lib/plug/debugger.ex:93: Zentonies.Endpoint."call (overridable 3)"/2
          (zentonies) lib/zentonies/endpoint.ex:1: Zentonies.Endpoint.call/2
          (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
          (cowboy) src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4
  </code></pre>
  
  <p>What am I doing wrong?</p>