@@ -56,6 +56,12 @@ describe("isClockSkewError", () => {
5656} ) ;
5757
5858describe ( "isThrottlingError" , ( ) => {
59+ [ 429 ] . forEach ( ( httpStatusCode ) => {
60+ it ( `should declare error with the HTTP Status Code "${ httpStatusCode } " to be a Throttling error` , ( ) => {
61+ checkForErrorType ( isTransientError , { httpStatusCode } , false ) ;
62+ } ) ;
63+ } ) ;
64+
5965 THROTTLING_ERROR_CODES . forEach ( ( name ) => {
6066 it ( `should declare error with the name "${ name } " to be a Throttling error` , ( ) => {
6167 checkForErrorType ( isThrottlingError , { name } , true ) ;
@@ -90,21 +96,21 @@ describe("isThrottlingError", () => {
9096
9197describe ( "isTransientError" , ( ) => {
9298 TRANSIENT_ERROR_CODES . forEach ( ( name ) => {
93- it ( `should declare error with the name "${ name } " to be a Throttling error` , ( ) => {
99+ it ( `should declare error with the name "${ name } " to be a Transient error` , ( ) => {
94100 checkForErrorType ( isTransientError , { name } , true ) ;
95101 } ) ;
96102 } ) ;
97103
98104 TRANSIENT_ERROR_STATUS_CODES . forEach ( ( httpStatusCode ) => {
99- it ( `should declare error with the HTTP Status Code "${ httpStatusCode } " to be a Throttling error` , ( ) => {
105+ it ( `should declare error with the HTTP Status Code "${ httpStatusCode } " to be a Transient error` , ( ) => {
100106 checkForErrorType ( isTransientError , { httpStatusCode } , true ) ;
101107 } ) ;
102108 } ) ;
103109
104110 while ( true ) {
105111 const name = Math . random ( ) . toString ( 36 ) . substring ( 2 ) ;
106112 if ( ! TRANSIENT_ERROR_CODES . includes ( name ) ) {
107- it ( `should not declare error with the name "${ name } " to be a Throttling error` , ( ) => {
113+ it ( `should not declare error with the name "${ name } " to be a Transient error` , ( ) => {
108114 checkForErrorType ( isTransientError , { name } , false ) ;
109115 } ) ;
110116 break ;
@@ -114,7 +120,7 @@ describe("isTransientError", () => {
114120 while ( true ) {
115121 const httpStatusCode = Math . ceil ( Math . random ( ) * 10 ** 3 ) ;
116122 if ( ! TRANSIENT_ERROR_STATUS_CODES . includes ( httpStatusCode ) ) {
117- it ( `should declare error with the HTTP Status Code "${ httpStatusCode } " to be a Throttling error` , ( ) => {
123+ it ( `should declare error with the HTTP Status Code "${ httpStatusCode } " to be a Transient error` , ( ) => {
118124 checkForErrorType ( isTransientError , { httpStatusCode } , false ) ;
119125 } ) ;
120126 break ;
0 commit comments