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);
});
};
}
In the
oauthActions.js
file, inside theloadAuthenticatedUser
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: