anchor.diff:      Msg = riak_pb_codec:decode(Code, Bin),
       case Msg of
           #tsqueryreq{query = Q}->
  -            case decode_query(Q) of
  +            case catch decode_query(Q) of
                   {ok, DecodedQuery} ->
                       PermAndTarget = decode_query_permissions(DecodedQuery),
                       {ok, DecodedQuery, PermAndTarget};
                   {error, Error} ->
  +                    {error, decoder_parse_error_resp(Error)};
  +                {'EXIT', {Error, _}} ->
                       {error, decoder_parse_error_resp(Error)}
               end;
           #tsgetreq{table = Table}->
  
positive.code: %% equally.
  -export([pk/1, lk/1]).
  
  -record(state, {}).
  
  %% per RIAK-1437, error codes assigned to TS are in the 1000-1500 range
  -define(E_SUBMIT,            1001).
  
negative.code:     end;
  
  
  process(#tslistkeysreq{table   = Table,
                         timeout = Timeout} = Req,
          State) ->
      Mod = riak_ql_ddl:make_module_name(Table),
      case catch Mod:get_ddl() of
          {_, {undef, _}} ->
              Props = riak_core_bucket:get_bucket(Table),
              {reply, missing_helper_module(Table, Props), State};
          DDL ->
              Result = riak_client:stream_list_keys(
                         {Table, Table}, Timeout,
                         {riak_client, [node(), undefined]}),
              case Result of
                  {ok, ReqId} ->
                      ColumnInfo =
                          [Mod:get_field_type(N)
                           || #param_v1{name = N} <- DDL#ddl_v1.local_key#key_v1.ast],
                      {reply, {stream, ReqId}, State#state{req = Req, req_ctx = ReqId,
                                                           column_info = ColumnInfo}};
                  {error, Reason} ->
                      {reply, make_rpberrresp(
                                ?E_LISTKEYS, flat_format("Failed to list keys: ~p", [Reason])),
  