Skip to content

Commit dd8bd77

Browse files
author
awstools
committed
feat(client-bedrock-agent-runtime): Add a 'reason' field to InternalServerException
1 parent 7d53fdd commit dd8bd77

File tree

8 files changed

+21
-1
lines changed

8 files changed

+21
-1
lines changed

clients/client-bedrock-agent-runtime/src/commands/InvokeAgentCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
10711071
* // },
10721072
* // internalServerException: { // InternalServerException
10731073
* // message: "STRING_VALUE",
1074+
* // reason: "STRING_VALUE",
10741075
* // },
10751076
* // validationException: { // ValidationException
10761077
* // message: "STRING_VALUE",

clients/client-bedrock-agent-runtime/src/commands/InvokeFlowCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export interface InvokeFlowCommandOutput extends InvokeFlowResponse, __MetadataB
121121
* // },
122122
* // internalServerException: { // InternalServerException
123123
* // message: "STRING_VALUE",
124+
* // reason: "STRING_VALUE",
124125
* // },
125126
* // validationException: { // ValidationException
126127
* // message: "STRING_VALUE",

clients/client-bedrock-agent-runtime/src/commands/InvokeInlineAgentCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,7 @@ export interface InvokeInlineAgentCommandOutput extends InvokeInlineAgentRespons
10831083
* // },
10841084
* // internalServerException: { // InternalServerException
10851085
* // message: "STRING_VALUE",
1086+
* // reason: "STRING_VALUE",
10861087
* // },
10871088
* // validationException: { // ValidationException
10881089
* // message: "STRING_VALUE",

clients/client-bedrock-agent-runtime/src/commands/OptimizePromptCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export interface OptimizePromptCommandOutput extends OptimizePromptResponse, __M
6868
* // },
6969
* // internalServerException: { // InternalServerException
7070
* // message: "STRING_VALUE",
71+
* // reason: "STRING_VALUE",
7172
* // },
7273
* // throttlingException: { // ThrottlingException
7374
* // message: "STRING_VALUE",

clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateStreamCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export interface RetrieveAndGenerateStreamCommandOutput extends RetrieveAndGener
4141
* <note>
4242
* <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>InvokeModelWithResponseStream</code>.</p>
4343
* </note>
44+
* <p>This operation requires permission for the <code> bedrock:RetrieveAndGenerate</code> action.</p>
4445
* @example
4546
* Use a bare-bones client and the command you need to make an API call.
4647
* ```javascript
@@ -319,6 +320,7 @@ export interface RetrieveAndGenerateStreamCommandOutput extends RetrieveAndGener
319320
* // },
320321
* // internalServerException: { // InternalServerException
321322
* // message: "STRING_VALUE",
323+
* // reason: "STRING_VALUE",
322324
* // },
323325
* // validationException: { // ValidationException
324326
* // message: "STRING_VALUE",

clients/client-bedrock-agent-runtime/src/models/models_0.ts

+7
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,12 @@ export class DependencyFailedException extends __BaseException {
12591259
export class InternalServerException extends __BaseException {
12601260
readonly name: "InternalServerException" = "InternalServerException";
12611261
readonly $fault: "server" = "server";
1262+
/**
1263+
* <p>The reason for the exception. If the reason is <code>BEDROCK_MODEL_INVOCATION_SERVICE_UNAVAILABLE</code>, the model invocation service is unavailable. Retry your request.</p>
1264+
* @public
1265+
*/
1266+
reason?: string | undefined;
1267+
12621268
/**
12631269
* @internal
12641270
*/
@@ -1269,6 +1275,7 @@ export class InternalServerException extends __BaseException {
12691275
...opts,
12701276
});
12711277
Object.setPrototypeOf(this, InternalServerException.prototype);
1278+
this.reason = opts.reason;
12721279
}
12731280
}
12741281

clients/client-bedrock-agent-runtime/src/protocols/Aws_restJson1.ts

+1
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,7 @@ const de_InternalServerExceptionRes = async (
836836
const data: any = parsedOutput.body;
837837
const doc = take(data, {
838838
message: __expectString,
839+
reason: __expectString,
839840
});
840841
Object.assign(contents, doc);
841842
const exception = new InternalServerException({

codegen/sdk-codegen/aws-models/bedrock-agent-runtime.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -4547,6 +4547,12 @@
45474547
"members": {
45484548
"message": {
45494549
"target": "com.amazonaws.bedrockagentruntime#NonBlankString"
4550+
},
4551+
"reason": {
4552+
"target": "smithy.api#String",
4553+
"traits": {
4554+
"smithy.api#documentation": "<p>The reason for the exception. If the reason is <code>BEDROCK_MODEL_INVOCATION_SERVICE_UNAVAILABLE</code>, the model invocation service is unavailable. Retry your request.</p>"
4555+
}
45504556
}
45514557
},
45524558
"traits": {
@@ -8285,7 +8291,7 @@
82858291
}
82868292
],
82878293
"traits": {
8288-
"smithy.api#documentation": "<p>Queries a knowledge base and generates responses based on the retrieved results, with output in streaming format.</p>\n <note>\n <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>InvokeModelWithResponseStream</code>.</p>\n </note>",
8294+
"smithy.api#documentation": "<p>Queries a knowledge base and generates responses based on the retrieved results, with output in streaming format.</p>\n <note>\n <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>InvokeModelWithResponseStream</code>.</p>\n </note>\n <p>This operation requires permission for the <code> bedrock:RetrieveAndGenerate</code> action.</p>",
82898295
"smithy.api#http": {
82908296
"code": 200,
82918297
"method": "POST",

0 commit comments

Comments
 (0)