Skip to content

Commit 6c4a66b

Browse files
fix: add ApiError type cast in pj-registration onError handler
The onError callback in useMutation provides Error type, but handleError expects ApiError. Added 'as ApiError' cast and imported the ApiError type from @/client to fix the TypeScript build error. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent adf0de0 commit 6c4a66b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

frontend/src/routes/pj-registration.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useForm } from "react-hook-form"
66
import { z } from "zod"
77

88
import {
9+
type ApiError,
910
type CompanyPublic,
1011
type CompanyRegistrationComplete,
1112
InvitesService,
@@ -427,7 +428,7 @@ function PjRegistration() {
427428
},
428429
onError: (err) => {
429430
setConfirmOpen(false)
430-
handleError.call(showErrorToast, err)
431+
handleError.call(showErrorToast, err as ApiError)
431432
},
432433
})
433434

0 commit comments

Comments
 (0)