From 51f624ebe444154756933d656c7ea422ea4e8616 Mon Sep 17 00:00:00 2001 From: Kuzma <57258237+ksvirkou-hubspot@users.noreply.github.com> Date: Mon, 30 May 2022 12:49:58 +0300 Subject: [PATCH] typescript: fix status code (#12472) --- .../src/main/resources/typescript/api/api.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 8b1adeb7155..a99424df3e0 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -208,7 +208,7 @@ export class {{classname}}ResponseProcessor { return body; {{/is2xx}} {{^is2xx}} - throw new ApiException<{{{dataType}}}>({{code}}, "{{message}}", body, response.headers); + throw new ApiException<{{{dataType}}}>(response.httpStatusCode, "{{message}}", body, response.headers); {{/is2xx}} {{/dataType}} {{^dataType}}