anchor.diff:  %%              {error, Reason}
   %% @end
   %%--------------------------------------------------------------------
  --spec submit_payload(binary(), binary(), binary(), boolean()) ->
  +-spec submit_payload(User, SessionToken, Payload, Final) ->
                               {ok, payload_added} |
                               {ok, payload_added, session_ended} |
  -                            {error, string()}.
  +                            {error, Reason}
  +                                when User :: binary(),
  +                                     SessionToken :: binary(),
  +                                     Payload :: binary(),
  +                                     Final :: boolean(),
  +                                     Reason :: binary().
   submit_payload(User, SessionToken, Payload, Final) ->
       gen_server:call(?MODULE, {proc_req, submit_payload, {User,
                                                            SessionToken,
  
positive.code: %%% Internal functions
  %%%===================================================================
  
  -spec priv_new_session(binary(), binary()) -> {ok, binary()} |
                                                {error, invalid_user} |
                                                {error, invalid_path}.
  priv_new_session(User, Path) ->
      % Check if user is registered with the cvmfs_auth service and which
      % paths he is allowed to modify
  
negative.code:             end
      end.
  
  -spec priv_end_session(SessionToken) -> ok | {error, invalid_token}
                                              when SessionToken :: binary().
  priv_end_session(_SessionToken) ->
      ok.
  
  -spec priv_submit_payload(User, SessionToken, Payload, State, Final) ->
                                   {ok, payload_added} |
                                   {ok, payload_added, session_ended} |
                                   {error, Reason}
                                       when User :: binary(),
                                            SessionToken :: binary(),
                                            Payload :: binary(),
                                            State :: map(),
                                            Final :: boolean(),
                                            Reason :: binary().
  priv_submit_payload(User, SessionToken, Payload, State, _Final) ->
      case priv_check_payload(User, SessionToken, Payload, State) of
          ok ->
  