1- import type { ApiRequestOptions } from " ./ApiRequestOptions"
2- import type { ApiResult } from " ./ApiResult"
1+ import type { ApiRequestOptions } from ' ./ApiRequestOptions' ;
2+ import type { ApiResult } from ' ./ApiResult' ;
33
44export class ApiError extends Error {
5- public readonly url : string
6- public readonly status : number
7- public readonly statusText : string
8- public readonly body : unknown
9- public readonly request : ApiRequestOptions
5+ public readonly url : string ;
6+ public readonly status : number ;
7+ public readonly statusText : string ;
8+ public readonly body : unknown ;
9+ public readonly request : ApiRequestOptions ;
1010
11- constructor (
12- request : ApiRequestOptions ,
13- response : ApiResult ,
14- message : string ,
15- ) {
16- super ( message )
11+ constructor ( request : ApiRequestOptions , response : ApiResult , message : string ) {
12+ super ( message ) ;
1713
18- this . name = " ApiError"
19- this . url = response . url
20- this . status = response . status
21- this . statusText = response . statusText
22- this . body = response . body
23- this . request = request
24- }
25- }
14+ this . name = ' ApiError' ;
15+ this . url = response . url ;
16+ this . status = response . status ;
17+ this . statusText = response . statusText ;
18+ this . body = response . body ;
19+ this . request = request ;
20+ }
21+ }
0 commit comments