File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1327,31 +1327,34 @@ Raven.prototype = {
1327
1327
} ,
1328
1328
1329
1329
_setBackoffState : function ( request ) {
1330
- // if we are already in a backoff state, don't change anything
1330
+ // If we are already in a backoff state, don't change anything
1331
1331
if ( this . _shouldBackoff ( ) ) {
1332
1332
return ;
1333
1333
}
1334
1334
1335
1335
var status = request . status ;
1336
1336
1337
1337
// 400 - project_id doesn't exist or some other fatal
1338
- // 401 - nvalid /revoked dsn
1338
+ // 401 - invalid /revoked dsn
1339
1339
// 429 - too many requests
1340
1340
if ( ! ( status === 400 || status === 401 || status === 429 ) )
1341
1341
return ;
1342
1342
1343
1343
var retry ;
1344
1344
try {
1345
- // If Retry-After is not in Access-Control-Allow -Headers, most
1345
+ // If Retry-After is not in Access-Control-Expose -Headers, most
1346
1346
// browsers will throw an exception trying to access it
1347
1347
retry = request . getResponseHeader ( 'Retry-After' ) ;
1348
1348
retry = parseInt ( retry , 10 ) ;
1349
1349
} catch ( e ) {
1350
1350
/* eslint no-empty:0 */
1351
1351
}
1352
1352
1353
+
1353
1354
this . _backoffDuration = retry
1355
+ // If Sentry server returned a Retry-After value, use it
1354
1356
? retry
1357
+ // Otherwise, double the last backoff duration (starts at 1 sec)
1355
1358
: this . _backoffDuration * 2 || 1000 ;
1356
1359
1357
1360
this . _backoffStart = now ( ) ;
You can’t perform that action at this time.
0 commit comments