anchor.diff:      Url = str_utils:format_bin("spaces/~s/transfers?state=~s~s~s", [
           Space, State, TokenParam, LimitParam
       ]),
  -    {ok, _, _, Body} = ?assertMatch({ok, 200, _, _}, rest_test_utils:request(
  -        Worker, Url, get, ?USER_1_AUTH_HEADERS(Config), <<>>
  -    )),
  -    ParsedBody = json_utils:decode(Body),
  -    Transfers = maps:get(<<"transfers">>, ParsedBody),
  -    NextPageToken = maps:get(<<"nextPageToken">>, ParsedBody, <<"null">>),
  -    {Transfers, NextPageToken}.
  +    case rest_test_utils:request(Worker, Url, get, ?USER_1_AUTH_HEADERS(Config), <<>>) of
  +        {ok, 200, _, Body} ->
  +            ParsedBody = json_utils:decode(Body),
  +            Transfers = maps:get(<<"transfers">>, ParsedBody),
  +            NextPageToken = maps:get(<<"nextPageToken">>, ParsedBody, <<"null">>),
  +            {ok, {Transfers, NextPageToken}};
  +        {ok, Code, _, Body} ->
  +            {Code, json_utils:decode(Body)}
  +    end.
   
   mock_get_share_on_other_node(OtherProviderNode, SupportingProviderNode, SessId, ShareId) ->
       case OtherProviderNode =/= SupportingProviderNode of
  
positive.code:     Transfers.
  
  list_all_transfers_via_rest(Config, Worker, Space, State, ChunkSize) ->
      Result = list_all_transfers_via_rest(Config, Worker, Space, State, ChunkSize, <<"null">>, []),
      % Make sure there are no duplicates
      ?assertEqual(lists:sort(Result), lists:usort(Result)),
      Result.
  
  list_all_transfers_via_rest(Config, Worker, Space, State, ChunkSize, StartId, Acc) ->
      {Transfers, NextPageToken} = list_transfers_via_rest(Config, Worker, Space, State, StartId, ChunkSize),
      case NextPageToken of
          <<"null">> ->
              Acc ++ Transfers;
          _ ->
              list_all_transfers_via_rest(Config, Worker, Space, State, ChunkSize, NextPageToken, Acc ++ Transfers)
      end.
  
  list_transfers_via_rest(Config, Worker, Space, State, StartId, LimitOrUndef) ->
  
negative.code: -include_lib("ctool/include/posix/errors.hrl").
  -include_lib("ctool/include/posix/acl.hrl").
  -include_lib("ctool/include/api_errors.hrl").
  -include_lib("ctool/include/privileges.hrl").
  
  %% API
  -export([
  