新しいレコードを保存しようとすると、一意の電子メール チェックを行う RESTful サービスがあります。失敗すると、「エラー」値を含む JSON メッセージとともに 400 エラー コードを返します。
残念ながら、保存時のエラー コールバックが起動していないようです。助言がありますか?
var nRecord = new RecordModel(values);
nRecord.save({
wait: true,
error: function(model,response){
console.log('error2');
obj.errorHandler(model,response);
},
success: function() {
console.log('success2');
obj.alert('Information saved!','Record Created!','success');
// if there were no errors, clear the list
$('#record-form :input').val('');
}
});
「Error2」はコンソールに表示されません。考え?