Change status code for too many requests
This commit is contained in:
parent
1cadcc1f59
commit
16aadfa664
@ -90,7 +90,7 @@ function App() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (error.response.status === 403) {
|
if (error.response.status === 403) {
|
||||||
setError(403);
|
setError(429);
|
||||||
} else if (error.response.status === 404) {
|
} else if (error.response.status === 404) {
|
||||||
setError(404);
|
setError(404);
|
||||||
} else {
|
} else {
|
||||||
@ -111,7 +111,7 @@ function App() {
|
|||||||
<ErrorPage
|
<ErrorPage
|
||||||
status={`${error}`}
|
status={`${error}`}
|
||||||
title={(error === 404) ? 'The Github Username is Incorrect' : (
|
title={(error === 404) ? 'The Github Username is Incorrect' : (
|
||||||
error === 403 ? 'Too Many Request.' : `Ops!!`
|
error === 429 ? 'Too Many Requests.' : `Ops!!`
|
||||||
)}
|
)}
|
||||||
subTitle={
|
subTitle={
|
||||||
(error === 404) ? (
|
(error === 404) ? (
|
||||||
@ -119,7 +119,7 @@ function App() {
|
|||||||
Please provide correct github username in <code>src\config.js</code>
|
Please provide correct github username in <code>src\config.js</code>
|
||||||
</p>
|
</p>
|
||||||
) : (
|
) : (
|
||||||
error === 403 ? (
|
error === 429 ? (
|
||||||
<p>
|
<p>
|
||||||
Oh no, you hit the{' '}
|
Oh no, you hit the{' '}
|
||||||
<a
|
<a
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user