This is an automated email from the ASF dual-hosted git repository.

dewrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 29fbb4e  in global 5xx handler, if there are custom alerts, show them
29fbb4e is described below

commit 29fbb4e578a1c4e8371f90925008bc4af9a308fc
Author: Jeremy Mitchell <mitchell...@gmail.com>
AuthorDate: Thu Apr 12 10:51:08 2018 -0600

    in global 5xx handler, if there are custom alerts, show them
---
 traffic_portal/app/src/app.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/traffic_portal/app/src/app.js b/traffic_portal/app/src/app.js
index 49a4645..c7c1e6d 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);
             }
 

-- 
To stop receiving notification emails like this one, please contact
dewr...@apache.org.

Reply via email to