Browse Source

HUE-6459 [imporeter] Fix js error on task creation error

Johan Ahlen 8 years ago
parent
commit
a7c22aaea2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      desktop/libs/indexer/src/indexer/templates/importer.mako

+ 1 - 1
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -1708,7 +1708,7 @@ ${ assist.assistPanel() }
             $.jHueNotify.info("${ _('Task ') }" + resp.history_uuid + "${_(' submitted.') }");
             $.jHueNotify.info("${ _('Task ') }" + resp.history_uuid + "${_(' submitted.') }");
             huePubSub.publish('notebook.task.submitted', resp.history_uuid);
             huePubSub.publish('notebook.task.submitted', resp.history_uuid);
           } else {
           } else {
-            $(document).trigger("error", data.message);
+            $(document).trigger("error", resp && resp.message ? resp.message : '${ _("Error importing") }');
           }
           }
         }).fail(function (xhr, textStatus, errorThrown) {
         }).fail(function (xhr, textStatus, errorThrown) {
           $(document).trigger("error", xhr.responseText);
           $(document).trigger("error", xhr.responseText);