Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ export class AwsRestXmlProtocol extends HttpBindingProtocol {

const ns = NormalizedSchema.of(errorSchema);
const message =
dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown";
dataObject.Error?.message ??
dataObject.Error?.Message ??
dataObject.message ??
dataObject.Message ??
"UnknownError";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there differences in the default error message for other protocols that were introduced in Nov '25?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, should we change all Unknowns to UnknownErrors?

Copy link
Contributor Author

@siddsriv siddsriv Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i restored uniformity for this message for all protocols (smithy-client src here, what i think was the old behavior)

separate commits for each protocol, for ease of review

const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;
const exception = new ErrorCtor(message);

Expand Down
Loading