for an incorrect Ajax action, I set with HTTP header code to 403 and send the following response :
{"code":"403","status":"Forbidden","message":"You cannot do this"}
However, I can't access this data when handling my error... Is it possible to acess "message"data from jqXHR ?
something like jqXHR.message ?
Many thanks for your help...
EDIt :
error: function (xhr) {
            $(".alert").html(xhr.responseText);
          },
This returns :
{"code":"403","status":"Forbidden","message":"You cannot do this"}
But xhr.responseText.message doesn't return anything ...
EDIT : this code works :
  error: function (xhr) {
    var jsonResponse = JSON.parse(xhr.responseText);
    $(".alert").html(jsonResponse.message);
  },
 
    