Browse Source

HUE-6315 [frontend] Avoid redirect to /500 on page error

Enrico Berti 8 năm trước cách đây
mục cha
commit
21805de
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      desktop/core/src/desktop/templates/hue.mako

+ 3 - 2
desktop/core/src/desktop/templates/hue.mako

@@ -689,8 +689,9 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
                 $('#embeddable_' + app).html(r);
                 self.isLoadingEmbeddable(false);
               },
-              error: function () {
-                page('/500');
+              error: function (xhr) {
+                console.error('Route loading problem', xhr);
+                self.loadApp('500');
               }
             });
           } else {