zRains commented on code in PR #3941:
URL: https://github.com/apache/ambari/pull/3941#discussion_r1944044202


##########
ambari-web/app/router.js:
##########
@@ -284,15 +284,15 @@ App.Router = Em.Router.extend({
     var dfd = $.Deferred();
     var self = this;
     var auth = App.db.getAuthenticated();
-    this.getClusterDataRequest().always(function (xhr) {
+    this.getClusterDataRequest().always(function (xhr, textStatus, 
jqXHRorErrorThrown) {

Review Comment:
   Be cautious when using `always`, as its parameters are a mix of those from 
`fail` and `done`. In case of a request failure, `xhr` will be `jqXHR`, which 
might not be reliable for verifying success. Additionally, `jqXHRorErrorThrown` 
will be` errorThrown`, which could lead to similar issues. I recommend using 
`textStatus` to determine if the request was successful before proceeding with 
the related logic.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to