How to handle this error myself?

I want to make it just include an error message in my form. Can I send it to a callback URL?
No description
1 Reply
KiNFiSH
KiNFiSH2d ago
you can handle like this -
export const auth = betterAuth({
onAPIError: {
throw: true,
onError: (error, ctx) => {
// Custom error handling
console.error("Auth error:", error);
},
errorURL: "/auth/error"
},
})
export const auth = betterAuth({
onAPIError: {
throw: true,
onError: (error, ctx) => {
// Custom error handling
console.error("Auth error:", error);
},
errorURL: "/auth/error"
},
})

Did you find this page helpful?