Utilizing angularjs' $http service to check the existence of a resource on my backend server. When the resource is found, the backend responds with a status code of 200, and if it doesn't exist, it returns a 404 status code. I have also added a function to handle cases where the resource doesn't exist within the promise.
Although everything functions as intended, there is an issue with angular logging an error in the console when the resource is not found:
Failed to load resource: the server responded with a status of 404 (Not Found)
.
In this scenario, this behavior is not considered an error for me, so I would prefer if angular did not log it as such, keeping the error console clean for genuine errors only.