Skip to content

Commit 1dff940

Browse files
authored
docs: rename StructuredOutputException to StructuredOutputError for TypeScript SDK (#690)
1 parent 58d1cd5 commit 1dff940

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/content/docs/user-guide/concepts/agents/structured-output.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ In Python, Strands accepts the `structured_output_model` parameter in agent invo
101101

102102
### Error Handling
103103

104-
When structured output validation fails, Strands throws a custom `StructuredOutputException` that can be caught and handled appropriately:
104+
When structured output validation fails, Strands throws a custom exception that can be caught and handled appropriately:
105105

106106
<Tabs>
107107
<Tab label="Python">

src/content/docs/user-guide/concepts/agents/structured-output.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Agent, StructuredOutputException, tool } from '@strands-agents/sdk'
1+
import { Agent, StructuredOutputError, tool } from '@strands-agents/sdk'
22
import { z } from 'zod'
33

44
// --8<-- [start:basic_usage]
@@ -39,7 +39,7 @@ async function errorHandling() {
3939
try {
4040
const result = await agent.invoke('some prompt')
4141
} catch (error) {
42-
if (error instanceof StructuredOutputException) {
42+
if (error instanceof StructuredOutputError) {
4343
console.log(`Structured output failed: ${error.message}`)
4444
}
4545
}

0 commit comments

Comments
 (0)