AJAX error function using a constant
I'd say it's pretty much by-the-book already, but you could use the catch block to set the default:

error: function(err){
  var errorMessage;
  try {
    errorMessage = JSON.parse(err.responseText).messages.messages[0].description;
  } catch(exception) {
    errorMessage = AJAX_ERROR;
  }
  displayError(errorMessage);
}


Or, you can use the full try...catch...finally formulation, if you want:

error: function(err){
  var errorMessage;
  try {
    errorMessage = JSON.parse(err.responseText).messages.messages[0].description;
  } catch(exception) {
    errorMessage = AJAX_ERROR;
  } finally {
    displayError(errorMessage);
  }
}


Or you can try getting the custom error message, and only defaulting at the last moment:

error: function(err){
  var errorMessage;
  try {
    errorMessage = JSON.parse(err.responseText).messages.messages[0].description;
  } catch(exception) {
    // ignored
  }
  displayError(errorMessage || AJAX_ERROR);
}


The possible advantage of this, is that if the server for any reason sends a blank (false'y) error message the above will still default to the generic error message, even though no exceptions were thrown.

In any event the overall approach seems OK to me. There's not really a cleaner way of getting the server's error message, since you have to parse the JSON and dig deep into the structure. Either thing may throw exceptions, so try...catch is the simplest way of handling that. At minimum you need the try..catch for JSON.parse anyway, so you might as well use it for both things.