File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1368,7 +1368,7 @@ Raven.prototype = {
1368
1368
// If Retry-After is not in Access-Control-Expose-Headers, most
1369
1369
// browsers will throw an exception trying to access it
1370
1370
retry = request . getResponseHeader ( 'Retry-After' ) ;
1371
- retry = parseInt ( retry , 10 ) ;
1371
+ retry = parseInt ( retry , 10 ) * 1000 ; // Retry-After is returned in seconds
1372
1372
} catch ( e ) {
1373
1373
/* eslint no-empty:0 */
1374
1374
}
Original file line number Diff line number Diff line change @@ -1207,12 +1207,12 @@ describe('globals', function() {
1207
1207
var mockError = new Error ( '401: Unauthorized' ) ;
1208
1208
mockError . request = {
1209
1209
status : 401 ,
1210
- getResponseHeader : sinon . stub ( ) . withArgs ( 'Retry-After' ) . returns ( '1337 ' )
1210
+ getResponseHeader : sinon . stub ( ) . withArgs ( 'Retry-After' ) . returns ( '2 ' )
1211
1211
} ;
1212
1212
opts . onError ( mockError ) ;
1213
1213
1214
1214
assert . equal ( Raven . _backoffStart , 100 ) ; // clock is at 100ms
1215
- assert . equal ( Raven . _backoffDuration , 1337 ) ; // converted to int
1215
+ assert . equal ( Raven . _backoffDuration , 2000 ) ; // converted to ms, int
1216
1216
} ) ;
1217
1217
1218
1218
it ( 'should reset backoffDuration and backoffStart if onSuccess is fired (200)' , function ( ) {
You can’t perform that action at this time.
0 commit comments