Skip to content

Commit 03cd619

Browse files
committed
fix(core/protocols): error message detection for AwsQuery
1 parent bf0e314 commit 03cd619

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/submodules/protocols/query/AwsQueryProtocol.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ export class AwsQueryProtocol extends RpcProtocol {
142142
): Promise<never> {
143143
const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
144144
const errorData = this.loadQueryError(dataObject);
145+
const message = this.loadQueryErrorMessage(dataObject);
146+
errorData.message = message;
145147

146148
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(
147149
errorIdentifier,
@@ -156,7 +158,6 @@ export class AwsQueryProtocol extends RpcProtocol {
156158
);
157159

158160
const ns = NormalizedSchema.of(errorSchema);
159-
const message = this.loadQueryErrorMessage(dataObject);
160161
const exception = new errorSchema.ctor(message);
161162

162163
const output = {} as any;

0 commit comments

Comments
 (0)