Skip to content

Commit

Permalink
🐛 Fix redirect to rate-limit (fixed upptime/upptime#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Dec 1, 2020
1 parent 32123d1 commit b2f6aa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/createOctokit.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const createOctokit = () => {
export const handleError = (error) => {
if (error.message === "Bad credentials") {
window.location.href = "/error";
} else if ((error.message || "").indexOf("rate limit exceeded")) {
} else if ((error.message || "").indexOf("rate limit exceeded") > -1) {
window.location.href = "/rate-limit-exceeded";
} else {
window.location.href = "/error";
Expand Down

0 comments on commit b2f6aa7

Please sign in to comment.