# Zod error.errors depricated by issues

**URL:** https://forum.codewithmosh.com/t/zod-error-errors-depricated-by-issues/71215
**Category:** Next.js
**Created:** [August 1, 2025, 11:37pm UTC](https://forum.codewithmosh.com/t/zod-error-errors-depricated-by-issues/71215 "2025-08-01T23:37:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![theorion](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/theorion/32/7783_2.png) [@theorion](https://forum.codewithmosh.com/u/theorion)
#### Post date: [August 1, 2025, 11:37pm UTC](https://forum.codewithmosh.com/t/zod-error-errors-depricated-by-issues/71215/1 "2025-08-01T23:37:49Z")

</div>

the following code is a simple and quick update. notice schema functions error property is same but it’s not error.errors it’s error.issues

you may see this error in your editor

Property ‘errors’ does not exist on type ‘ZodError\<{ name: string; }\>’.ts(2339)

> export async function PUT(request: NextRequest, {params}: Params ) {
> 
> ```auto
> const body = await request.json()
> 
> const validation = schema.safeParse(body)
> 
> ```
> 
> if( !validation.success )
> 
> ```auto
> return NextResponse.json(validation.error.issues, {status: 400})
> 
> ```
> 
> if(params.id \> 10)
> 
> ```auto
> return NextResponse.json({error: 'user not found'}, {status: 404})
> 
> return NextResponse.json({id:1, name: body.name}, {status: 200})
> 
> ```
> 
> }
