Skip to content

Commit

Permalink
🐛 FIx redirect to config path page
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Dec 6, 2020
1 parent 9c66788 commit e96423e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/createOctokit.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ export const createOctokit = () => {

export const handleError = (error) => {
if (error.message === "Bad credentials") {
window.location.href = "/error";
window.location.href = config.path + "/error";
} else if ((error.message || "").indexOf("rate limit exceeded") > -1) {
window.location.href = "/rate-limit-exceeded";
window.location.href = config.path + "/rate-limit-exceeded";
} else {
window.location.href = "/error";
window.location.href = config.path + "/error";
console.log(error.message);
}
};

0 comments on commit e96423e

Please sign in to comment.