anchor.diff:    ok = gun:close(Conn),
     {ok, Req, [{result, ok}|Env]}.
   
  +error_terminate(Req, State, Class, Reason, Callback, Arity) ->
  +  error_terminate(Req, State, Class, Reason, Callback, Arity, 500).
   error_terminate(Req, State = #state{handler = Handler, handler_state = HandlerState},
  -		Class, Reason, Callback, Arity) ->
  +		Class, Reason, Callback, Arity, Status) ->
     proxy_terminate(Req, State),
  -  cowboy_req:maybe_reply(500, Req),
  +  cowboy_req:maybe_reply(Status, Req),
     erlang:Class([
       {reason, Reason},
       {mfa, {Handler, Callback, Arity}},
  
positive.code:     {done, Req2} ->
        ok = gun:data(Conn, Ref, fin, <<>>),
        next(Req2, State, fun res_status/2);
      {error, _Reason} ->
        %% TODO send back a better error message
        next(Req, State, 400)
    end.
  
  res_status(Req, State = #state{conn = Conn, ref = Ref, timeout = _Timeout, res_headers = ResHeaders}) ->
    receive
      {gun_response, Conn, Ref, Fin, Status, Headers} ->
        next(Req, State#state{res_status = Status,
                              res_headers = filter_headers(Headers, ResHeaders),
                              res_has_body = Fin =:= nofin}, fun res_headers/2)
    %% after Timeout TODO
    end.
  
  res_headers(Req, State = #state{res_headers = ResHeaders}) ->
  
negative.code:   Ref = gun:request(Conn, Method, Path, Headers),
    next(Req, State#state{ref = Ref}, fun req_body/2).
  
  req_body(Req, State = #state{conn = Conn, ref = Ref, method = Method}) ->
    case cowboy_req:has_body(Req) of
      true ->
        case exported(Req, State, req_body, 3) of
  