Angular hitting rest API and getting 400

I am hitting a request from angular but it is not hitting service giving error 400, 404 and sometimes Content type not accessible in response

code of angular

$scope.addOperator = function() {
    var req = {
        method : 'POST',
        url : config.apiUrl + "/addoperator",

        data: $scope.fields
    }
    $http(req).then(function successCallback(data) {

                $scope.resp_res = true;
                $scope.MSG = "Operator is created successfully";
                return;

    }, function errorCallback(response) {
            console.log(response.statusText);
        });
        $scope.MSG = "Operator is created successfully";
};

and my service code is here

@CrossOrigin(allowedHeaders = { "Content-Type" })
@RequestMapping(value = "addoperator",method=RequestMethod.POST)
public ResponseEntity<?> addOperator(@RequestBody AddOperatorBean addOperatorBean)
{
    logger.info("call add operator!!! ");

    AddOperator addOperator = new AddOperator();
    addOperator.setName(addOperatorBean.getName());
    addOperator.setEmail(addOperatorBean.getEmail());
    addOperator.setMobile(addOperatorBean.getMobile());
    addOperator.setPin(addOperatorBean.getPin());
    addOperator.setLotid(addOperatorBean.getLotid());
    addOperator.setRoleId(addOperatorBean.getRoleId());
//  addOperator.setStatus(addOperatorBean.isStatus());
    addOperator.setStatus(false);
    addOperator.setCreatedAt(new Timestamp(new Date().getTime()));
    checkUserService.addOperator(addOperator);
    return new ResponseEntity<>(HttpStatus.OK);
}

Thanks For help in advance

Source: AngularJS