Pārlūkot izejas kodu

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

Enrico Berti 8 gadi atpakaļ
vecāks
revīzija
21805de
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  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 {