TypeError on Signup
On signup I have this error:
I suspect it is due to the prisma schema
which is
12 Replies
log your error with
error.stack
to see the reason.would i need to extend a function to log the error in the [all] api route?
should be able to use this https://www.better-auth.com/docs/concepts/hooks#errors
Hooks | Better Auth
Better Auth Hooks let you customize BetterAuth's behavior
Like this?
@begot
sorry, i missed your other message - i haven't used the error hook myself, test it out and see if it behaves as expected.
No worries, it still seems to output this without a full stack
could be because it's throwing ctx.error - i remember seeing this and resolving it by logging with .stack
instead of throwing, can you temporarily log ctx.error.stack
this is thrown from prisma. I think it's cause your Id fields are integer. Better auth expectes string Ids. If you really need to make them int instead, you'd need to disable generated Ids by setting
advanced.generateId
to false
.Ok thank you!
the man himself got you
Than you for the advice, ill try it out :)
and i love what your doing with the library