compumike08 / GitHub_Status_API_GUI

GUI tool to interact with GitHub Status API
MIT License
0 stars 0 forks source link

In `oauthActions.js`, in `loadAuthenticatedUser` method, improve error handling instead of re-throwing error #12

Open compumike08 opened 8 years ago

compumike08 commented 8 years ago

In the oauthActions.js file, inside the loadAuthenticatedUser method, improve error handling instead of simply re-throwing error in cases when GithubAPI call returns with an error.

This issue is marked in the source code with a TODO inside the catch block:

export function loadAuthenticatedUser() {
  return function (dispatch){
    return GithubAPI.getAuthenticatedUser().then(user => {
      dispatch(oauthAuthUserLoaded(user));
    }).catch(error => {
      //TODO: Improve error handling instead of re-throwing error
      throw(error);
    });
  };
}