socialappslab / appcivist-pb-client

Web Client of AppCivist, for the instance of Participatory Budgeting
Other
4 stars 2 forks source link

Auth header is not set sometimes when requesting /space/:id/contribution/:cid?flat=true #1408

Closed cdparra closed 4 years ago

cdparra commented 5 years ago

See sentry backend log: https://sentry.io/share/issue/bb82c12d50d740598d0cb40c48a01334/

This is actually a FrontEnd error. The client is not setting the session key header on the request.

In the current UI, here is where it happens:

    function syncProposalWithPeerdoc() {
      let rsp;
      if ($scope.isAnonymous) {
        rsp = Contributions.flatContributionInResourceSpace(null, $scope.proposal.uuid, true).get().$promise;
      } else {
        rsp = Contributions.flatContributionInResourceSpace($scope.campaign.resourceSpaceId, $scope.proposal.contributionId, false).get().$promise;
      }
      rsp.then(
        contribution => {
          if (!$scope.isTitleEdit)
            $scope.proposal.title = contribution.title;
          if (!$scope.isDescriptionEdit)
            $scope.proposal.text = contribution.text;
          $scope.proposal.lastUpdate = contribution.lastUpdate;
        },
        error => Notify.show(error.statusMessage, 'error')
      )
    }
yolile commented 4 years ago

no reproducible, there are not similar issues in the sentry