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 = {
13681368 // If Retry-After is not in Access-Control-Expose-Headers, most
13691369 // browsers will throw an exception trying to access it
13701370 retry = request . getResponseHeader ( 'Retry-After' ) ;
1371- retry = parseInt ( retry , 10 ) ;
1371+ retry = parseInt ( retry , 10 ) * 1000 ; // Retry-After is returned in seconds
13721372 } catch ( e ) {
13731373 /* eslint no-empty:0 */
13741374 }
Original file line number Diff line number Diff line change @@ -1207,12 +1207,12 @@ describe('globals', function() {
12071207 var mockError = new Error ( '401: Unauthorized' ) ;
12081208 mockError . request = {
12091209 status : 401 ,
1210- getResponseHeader : sinon . stub ( ) . withArgs ( 'Retry-After' ) . returns ( '1337 ' )
1210+ getResponseHeader : sinon . stub ( ) . withArgs ( 'Retry-After' ) . returns ( '2 ' )
12111211 } ;
12121212 opts . onError ( mockError ) ;
12131213
12141214 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
12161216 } ) ;
12171217
12181218 it ( 'should reset backoffDuration and backoffStart if onSuccess is fired (200)' , function ( ) {
You can’t perform that action at this time.
0 commit comments