Skip to content

Commit

Permalink
fix(Python): Support more than one error defined on a localService tr…
Browse files Browse the repository at this point in the history
…ait (#621)
  • Loading branch information
lucasmcdonald3 authored Oct 7, 2024
1 parent a0e3d86 commit 527ee84
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,17 +365,6 @@ private void generateNativeWrapperFunctionDefinitionForResource(
.expectShape(codegenContext.settings().getService())
.asServiceShape()
.get();
List<ShapeId> serviceDependencyErrors = serviceShape.getErrors();
// Services don't specify a "default" error.
// Pick the first one off its list of errors.
// Crypto Tools currently only specifies one error per service, so this works perfectly, but may not
// extend well.
// This will need to be updated.
if (serviceDependencyErrors.size() > 1) {
throw new IllegalArgumentException(
"Only 1 service-modelled error per service supported"
);
}

writer.addStdlibImport(
SmithyNameResolver.getPythonModuleSmithygeneratedPathForSmithyNamespace(
Expand Down

0 comments on commit 527ee84

Please sign in to comment.