You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/04/12 16:53:47 UTC

[GitHub] dewrich closed pull request #2129: TP - in global 5xx handler, if there are custom alerts, show them

dewrich closed pull request #2129: TP - in global 5xx handler, if there are custom alerts, show them
URL: https://github.com/apache/incubator-trafficcontrol/pull/2129
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_portal/app/src/app.js b/traffic_portal/app/src/app.js
index 49a464588..c7c1e6dbc 100644
--- a/traffic_portal/app/src/app.js
+++ b/traffic_portal/app/src/app.js
@@ -419,7 +419,11 @@ trafficPortal.factory('authInterceptor', function ($rootScope, $q, $window, $loc
             } else if (rejection.status.toString().match(/^5\d[01356789]$/)) {
                 // matches 5xx EXCEPT for 502's and 504's which indicate a timeout and will be handled by each service call accordingly
                 $timeout(function () {
-                    messageModel.setMessages([ { level: 'error', text: rejection.status.toString() + ': ' + rejection.statusText } ], false);
+                    if (alerts.length > 0) {
+                            messageModel.setMessages(alerts, false);
+                    } else {
+                            messageModel.setMessages([ { level: 'error', text: rejection.status.toString() + ': ' + rejection.statusText } ], false);
+                    }
                 }, 200);
             }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services