kappnav / issues

kAppNav global issues
0 stars 0 forks source link

Improve error handling in when polling for completed command actions #154

Closed kinueng closed 4 years ago

kinueng commented 4 years ago

Follow up improved due to #152.

The NotificationHandler [1] code runs on every single UI page. The Kubernetes API has a tendency of returning HTTP 207 responses with a JSON containing a server side error. The current NotificationHandler does not detect these server errors masked as 207. When an error is return from the API, the NotificationHandler will mishandle the error and crash the entire UI. Since the NotificationHandler runs on every UI page, this can be extremely bad.

Even if we do handle the error and fail silently, we need a way to capture logs showing the client side JavaScript encountered an error. If we don't, failures will go unnoticed and even disable features completely without users' awareness.

[1] https://github.com/kappnav/ui/blob/master/src-web/components/kappnav/common/NotificationHandler.js