@@ -67,7 +67,7 @@ export abstract class BaseTransport implements Transport {
6767 * https://developer.mozilla.org/en-US/docs/Web/API/Headers/get
6868 */
6969 const limited = this . _handleRateLimit ( headers ) ;
70- if ( limited ) logger . warn ( `Too many requests, backing off till : ${ this . _disabledUntil ( requestType ) } ` ) ;
70+ if ( limited ) logger . warn ( `Too many requests, backing off until : ${ this . _disabledUntil ( requestType ) } ` ) ;
7171
7272 if ( status === Status . Success ) {
7373 resolve ( { status } ) ;
@@ -100,6 +100,16 @@ export abstract class BaseTransport implements Transport {
100100 const raHeader = headers [ 'retry-after' ] ;
101101
102102 if ( rlHeader ) {
103+ // rate limit headers are of the form
104+ // <header>,<header>,..
105+ // where each <header> is of the form
106+ // <retry_after>: <categories>: <scope>: <reason_code>
107+ // where
108+ // <retry_after> is a delay in ms
109+ // <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form
110+ // <category>;<category>;...
111+ // <scope> is what's being limited (org, project, or key) - ignored by SDK
112+ // <reason_code> is an arbitrary string like "org_quota" - ignored by SDK
103113 for ( const limit of rlHeader . trim ( ) . split ( ',' ) ) {
104114 const parameters = limit . split ( ':' , 2 ) ;
105115 const headerDelay = parseInt ( parameters [ 0 ] , 10 ) ;
0 commit comments