1414 * limitations under the License.
1515 */
1616
17+ import axios , { AxiosResponse } from 'axios' ;
1718import { ApiError , ClientError } from './errors' ;
18- import { IpInfo , RequesterIpInfo } from './model' ;
1919import { IpregistryConfig } from './index' ;
20+ import { IpInfo , RequesterIpInfo } from './model' ;
2021import { IpregistryOption } from './options' ;
2122
22- import axios , { AxiosResponse } from 'axios' ;
23-
2423
2524export interface ApiResponse < T > {
2625
@@ -102,7 +101,7 @@ export class DefaultRequestHandler implements IpregistryRequestHandler {
102101 data : response . data as IpInfo ,
103102 throttling : this . getThrottlingData ( response )
104103 } ;
105- } catch ( error ) {
104+ } catch ( error : any ) {
106105 if ( error . isAxiosError && error . response ) {
107106 const data = error . response . data ;
108107 throw new ApiError ( data . code , data . message , data . resolution ) ;
@@ -129,7 +128,7 @@ export class DefaultRequestHandler implements IpregistryRequestHandler {
129128 data : response . data . results ,
130129 throttling : this . getThrottlingData ( response )
131130 } ;
132- } catch ( error ) {
131+ } catch ( error : any ) {
133132 if ( error . isAxiosError && error . response ) {
134133 const data = error . response . data ;
135134 throw new ApiError ( data . code , data . message , data . resolution ) ;
@@ -155,7 +154,7 @@ export class DefaultRequestHandler implements IpregistryRequestHandler {
155154 data : response . data as RequesterIpInfo ,
156155 throttling : this . getThrottlingData ( response )
157156 } ;
158- } catch ( error ) {
157+ } catch ( error : any ) {
159158 if ( error . isAxiosError && error . response ) {
160159 const data = error . response . data ;
161160 throw new ApiError ( data . code , data . message , data . resolution ) ;
0 commit comments