Skip to content

Commit

Permalink
fix: fix trpc error fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanvanherwijnen committed Oct 3, 2024
1 parent 7cb20fe commit 2d9a23b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/app/src/trpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const createUseTrpc = async () => {
if (!res.ok) {
const body = await res.clone().json()

const serverErrors = body?.error
const serverErrors = body?.error || body?.[0]?.error
let caption: string
const { message, code, path, expected, received } = serverErrors
if (message) {
Expand Down

0 comments on commit 2d9a23b

Please sign in to comment.