@@ -24,6 +24,7 @@ import {
2424import { TypingInfo } from "./models/TypingInfo" ;
2525import { APIErrorResponse } from "./models/APIErrorResponse" ;
2626import { IntakePayloadAccepted } from "./models/IntakePayloadAccepted" ;
27+ import { JSONAPIErrorResponse } from "./models/JSONAPIErrorResponse" ;
2728import { MetricAllTagsResponse } from "./models/MetricAllTagsResponse" ;
2829import { MetricAssetsResponse } from "./models/MetricAssetsResponse" ;
2930import { MetricBulkTagConfigCreateRequest } from "./models/MetricBulkTagConfigCreateRequest" ;
@@ -1285,21 +1286,24 @@ export class MetricsApiResponseProcessor {
12851286 response . httpStatusCode === 429
12861287 ) {
12871288 const bodyText = parse ( await response . body . text ( ) , contentType ) ;
1288- let body : APIErrorResponse ;
1289+ let body : JSONAPIErrorResponse ;
12891290 try {
12901291 body = deserialize (
12911292 bodyText ,
12921293 TypingInfo ,
1293- "APIErrorResponse " ,
1294- ) as APIErrorResponse ;
1294+ "JSONAPIErrorResponse " ,
1295+ ) as JSONAPIErrorResponse ;
12951296 } catch ( error ) {
12961297 logger . debug ( `Got error deserializing error: ${ error } ` ) ;
1297- throw new ApiException < APIErrorResponse > (
1298+ throw new ApiException < JSONAPIErrorResponse > (
12981299 response . httpStatusCode ,
12991300 bodyText ,
13001301 ) ;
13011302 }
1302- throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
1303+ throw new ApiException < JSONAPIErrorResponse > (
1304+ response . httpStatusCode ,
1305+ body ,
1306+ ) ;
13031307 }
13041308
13051309 // Work around for missing responses in specification, e.g. for petstore.yaml
0 commit comments