Skip to content

Commit 080d9ad

Browse files
committed
fix parsing default exception without body.Error
1 parent c6735f8 commit 080d9ad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/HttpProtocolGeneratorUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,8 @@ static Set<StructureShape> generateErrorDispatcher(
345345
}
346346

347347
// Error responses must be at least ServiceException interface
348-
writer.addImport("ServiceException", "__ServiceException", TypeScriptDependency.AWS_SMITHY_CLIENT.packageName);
348+
writer.addImport("ServiceException", "__ServiceException",
349+
TypeScriptDependency.AWS_SMITHY_CLIENT.packageName);
349350
writer.write("let response: __ServiceException;");
350351
writer.write("let errorCode: string = \"UnknownError\";");
351352
errorCodeGenerator.accept(context);
@@ -359,7 +360,7 @@ static Set<StructureShape> generateErrorDispatcher(
359360
String errorDeserMethodName = ProtocolGenerator.getDeserFunctionName(errorSymbol,
360361
context.getProtocolName()) + "Response";
361362
// Dispatch to the error deserialization function.
362-
String outputParam = shouldParseErrorBody ? "parsedOutput" : "output";
363+
String outputParam = shouldParseErrorBody ? "parsedOutput" : "output";
363364
writer.write("case $S:", errorId.getName());
364365
writer.write("case $S:", errorId.toString());
365366
writer.indent()

0 commit comments

Comments
 (0)