Change signature in $.ajax's error callback
Error callback in $.ajax has different signature than success callback
This commit is contained in:
parent
60116154c7
commit
60a77742c0
|
@ -65,7 +65,7 @@ ajax = Em.Object.create
|
||||||
success.apply(this, arguments)
|
success.apply(this, arguments)
|
||||||
|
|
||||||
error = options.error || (->)
|
error = options.error || (->)
|
||||||
options.error = (data, status, xhr) =>
|
options.error = (xhr, status, data) =>
|
||||||
Travis.lookup('controller:flash').pushObject(data.flash) if data?.flash
|
Travis.lookup('controller:flash').pushObject(data.flash) if data?.flash
|
||||||
delete data.flash if data?
|
delete data.flash if data?
|
||||||
console.log "[ERROR] API responded with an error (#{status}): #{JSON.stringify(data)}"
|
console.log "[ERROR] API responded with an error (#{status}): #{JSON.stringify(data)}"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user