anchor.diff:                   ?assertEqual({error,<<"{'query',{\"Query takes a list of step tuples\",undefined}}">>},
                                 Res)
                end)}
  -
        ].
   
   -endif.
  
positive.code: after_send(_Request, State) ->
      {noreply, State}.
  
  %%
  %% Called after receiving an error message - supports reruning
  %% an error for streaming calls
  
negative.code: %% ====================================================================
  
  maybe_reply({reply, Reply, State}) ->
      Request = State#state.pending,
      NewRequest = send_caller(Reply, Request),
      State#state{pending = NewRequest};
  maybe_reply({noreply, State}) ->
      State.
  
  %% @private
  %% Reply to caller - form clause first in case a ReqId/Client was passed
  %% in as the context and gen_server:reply hasn't been called yet.
  send_caller(Msg, #request{ctx = {ReqId, Client}, 
                            from = undefined}=Request) ->
      Client ! {ReqId, Msg},
      Request;
  send_caller(Msg, #request{from = From}=Request) when From /= undefined ->
      gen_server:reply(From, Msg),
      Request#request{from = undefined}.
  
  default_timeout(_Op) ->
      60000.
  