Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$http Service Not Calling Error Callback on 400 #2609

@lsiv568

Description

@lsiv568

Version: 1.1.4

createNewWall: function(wall, successCallback, errorCallback) {
    return $http.post($rootScope.baseAppsAPI + '/walls', null, {
       params: wall
    }).success(function(data, status) {
       return successCallback.call(this, data);
    }).error(function(data) {
       return errorCallback.call(this, data);
    });
}

I verified that the angular isSuccess function is working correctly. I did this by adding it to the window object and verifying that the below code (placed in my sucess callback ) resulted in the error callback being called.

if (window.isSuccess(status)) {
   return successCallback.call(this, data);
} else {
  return errorCallback.call(this, data);
}

Any idea as to what is causing the issue? Something going wrong with the $http promises not being correctly rejected/resolved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions