Skip to content

Commit 074dcfd

Browse files
authored
fix(docs): fix TypeValidationError reference in Message Persistence docs (#8178)
## Background [`TypeValidationError`](https://github.com/vercel/ai/blob/c4eff2967ae1cbcb1cc8fd251447c664ea9b868c/packages/provider/src/errors/type-validation-error.ts#L8) was mistakenly referenced as `AITypeValidationError` in Message Persistence docs ## Summary `AITypeValidationError` -> `TypeValidationError`
1 parent 35490bc commit 074dcfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ import {
148148
convertToModelMessages,
149149
streamText,
150150
validateUIMessages,
151-
AITypeValidationError,
151+
TypeValidationError,
152152
} from 'ai';
153153
import { type MyUIMessage } from '@/types';
154154

@@ -167,7 +167,7 @@ export async function POST(req: Request) {
167167
metadataSchema,
168168
});
169169
} catch (error) {
170-
if (error instanceof AITypeValidationError) {
170+
if (error instanceof TypeValidationError) {
171171
// Log validation error for monitoring
172172
console.error('Database messages validation failed:', error);
173173
// Could implement message migration or filtering here

0 commit comments

Comments
 (0)