Skip to content

Commit 2d9a23b

Browse files
fix: fix trpc error fetch
1 parent 7cb20fe commit 2d9a23b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/app/src/trpc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const createUseTrpc = async () => {
2828
if (!res.ok) {
2929
const body = await res.clone().json()
3030

31-
const serverErrors = body?.error
31+
const serverErrors = body?.error || body?.[0]?.error
3232
let caption: string
3333
const { message, code, path, expected, received } = serverErrors
3434
if (message) {

0 commit comments

Comments
 (0)