From 1817ace0d52252bf0c2c3262eeed63784c4f4978 Mon Sep 17 00:00:00 2001 From: tim-kos Date: Tue, 22 Jul 2014 08:27:54 +0200 Subject: [PATCH] properly show assembly id as returned by the api response in case of ASSEMBLY_NOT_FOUND --- js/lib/jquery.transloadit2.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/lib/jquery.transloadit2.js b/js/lib/jquery.transloadit2.js index 2e16120..c3f5d78 100644 --- a/js/lib/jquery.transloadit2.js +++ b/js/lib/jquery.transloadit2.js @@ -703,8 +703,10 @@ var text = 'There was an internal error.
Please try your upload again.'; this.$modal.$error.html(text).show(); - var self = this; - var ip = null; + var assemblyId = err.assemblyId ? err.assemblyId : this.assemblyId; + var self = this; + var ip = null; + $.getJSON(PROTOCOL + 'jsonip.com/', function(ipData) { ip = ipData.ip; }) @@ -712,7 +714,7 @@ var details = { endpoint : err.url, instance : self.instance, - assembly_id : self.assemblyId, + assembly_id : assemblyId, ip : ip, time : self.getUTCDatetime(), agent : navigator.userAgent,