Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ public AwsJson1Protocol(ShapeId service) {
}

private static ShapeId extractErrorType(Document document, String namespace) {
// Per the awsJson1_0 spec, the __type discriminator may carry an over-the-wire namespace
// like "com.amazonaws.dynamodb.v20120810#ResourceNotFoundException" that doesn't match
// the model's namespace. Strip the namespace and let parseDiscriminator re-attach the
// service's namespace so registry lookup succeeds.
return DocumentDeserializer.parseDiscriminator(
ErrorTypeUtils.removeUri(ErrorTypeUtils.readTypeAndCode(document)),
ErrorTypeUtils.removeNamespaceAndUri(ErrorTypeUtils.readTypeAndCode(document)),
namespace);
}

Expand Down
Loading