From 60a77742c0a1e2c4b86e0be66a472bb0904e3ab7 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Mon, 7 Dec 2015 09:39:37 +0100 Subject: [PATCH] Change signature in $.ajax's error callback Error callback in $.ajax has different signature than success callback --- app/utils/ajax.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/ajax.coffee b/app/utils/ajax.coffee index c206845b..d68f7bd2 100644 --- a/app/utils/ajax.coffee +++ b/app/utils/ajax.coffee @@ -65,7 +65,7 @@ ajax = Em.Object.create success.apply(this, arguments) error = options.error || (->) - options.error = (data, status, xhr) => + options.error = (xhr, status, data) => Travis.lookup('controller:flash').pushObject(data.flash) if data?.flash delete data.flash if data? console.log "[ERROR] API responded with an error (#{status}): #{JSON.stringify(data)}"