• surbhi nahta
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I am folloiwng the tutorial mentioned in the below URL.

https://developer.salesforce.com/mobile/getting-started/html5/#angularjs-heroku

I followed exactly as mentioned, I am able to OAuth successfully, I am able to create a contact and that gets saved, but during contact list view, I am getting the following error.

Error:
------------------------------------------------------------
Calling errorCB for forcetkClient:query

Refused to set unsafe header "User-Agent"
GET https://peaceful-gorge-3898.herokuapp.com/proxy/?_=1406084316812 400 (Bad Request)

function (){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this}

------------------------------------------------------------------------

I am getting this error at this point.

function ContactListCtrl($scope, AngularForce, $location, Contact) {
    if (!AngularForce.authenticated()) {
        return $location.path('/home');
    }

    $scope.searchTerm = '';
    $scope.working = false;

    Contact.query(function (data) {
        $scope.contacts = data.records;
        $scope.$apply();//Required coz sfdc uses jquery.ajax
    }, function (data) {
        console.log(' ~~~~~~~~~~~~~ Error : ' + data.error);
        alert('Query Error : ' + data.error);
        $scope.contacts = data.records;

    });

Did anybody encounter any such error?