I have an Angularjs application that uses $http.post() to make web service calls. The called method has a void return type and it generates a 204 response code (no content). This is part of the error function, which is defined in the .then() callback and prints "no element found" in the log.
If I return something from the method, it will return a normal 200 response code.
Why does the success code trigger the error function?
Code as requested:
function myFn(inputData) { var d = { data: inputData }; $http.post("../api/my/serverFn", d) .then( function(response) { $rootScope.AddMsg("Success"); }, function(response) {
Screen shot requested: 
source share