File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,7 @@ export default function rateLimit (instance, maxRetry = 10) {
1212 // in axios reponse will be available only if there a response from server
1313 // in this case will assume it is a 500 error
1414 error . response = error . response || { status : 500 }
15-
16- if ( error . response . status >= 500 ) {
15+ if ( error . response . status === 500 ) {
1716 attempt ++
1817 lastErrorAt = lastErrorAt || Date . now ( )
1918 if ( Date . now ( ) - lastErrorAt >= 30000 ) {
@@ -28,7 +27,7 @@ export default function rateLimit (instance, maxRetry = 10) {
2827 }
2928
3029 // retry if we receive 429 or 500
31- if ( error . response . status === 429 || error . response . status > = 500 ) {
30+ if ( error . response . status === 429 || error . response . status == = 500 ) {
3231 var rateLimitHeaderValue = 0
3332 // all headers are lowercased by axios https://github.com/mzabriskie/axios/issues/413
3433 if ( error . response . headers && error . response . headers [ 'x-contentful-ratelimit-reset' ] ) {
You can’t perform that action at this time.
0 commit comments