Use explicit $.ajax dataType and add error callback