From 4bcb37e12828ac6d1ac6ab95399d4d57bc680299 Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Wed, 11 Oct 2023 12:23:43 +0200 Subject: [PATCH] Type errorCode as possibly undefined (#953) --- src/management/management-client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/management/management-client.ts b/src/management/management-client.ts index 08c04e6f1..f5cad0d80 100644 --- a/src/management/management-client.ts +++ b/src/management/management-client.ts @@ -8,7 +8,7 @@ import { ResponseError } from '../lib/index.js'; import { TelemetryMiddleware } from '../lib/middleware/telemetry-middleware.js'; interface ManagementApiErrorResponse { - errorCode: string; + errorCode: string | undefined; error: string; message: string; statusCode: number; @@ -17,7 +17,7 @@ interface ManagementApiErrorResponse { export class ManagementApiError extends Error { override name = 'ManagementApiError' as const; constructor( - public errorCode: string, + public errorCode: string | undefined, public error: string, public statusCode: number, public body: string,