I am trying to return a custom error message to the user to let them know what went wrong if an error occurs, but I have tried everything to display the message and nothing
Replace .error() by .catch().
$http.post('/url',json) .success(function(data, status, headers, config){ // some code here }) .catch(function(data, status, headers, config){ // <--- catch instead error data.statusText; //contains the error message });