ctx.error type
const handleSubmit = async (values: UserLoginValues) => {
await authClient.signIn.email(values, {
onError: (ctx) => {
console.log(ctx.error);
setError(getErrorMessage(ctx.error., "ua"));
setStatus("idle");
},
onRequest: () => {
setStatus("loading");
setError("");
},
onSuccess: () => {
setStatus("success");
router.push("/");
router.refresh();
},
});
};
console.log(ctx.error);
{
"message": "Invalid email or password",
"code": "INVALID_EMAIL_OR_PASSWORD",
"status": 401,
"statusText": "UNAUTHORIZED"
} const handleSubmit = async (values: UserLoginValues) => {
await authClient.signIn.email(values, {
onError: (ctx) => {
console.log(ctx.error);
setError(getErrorMessage(ctx.error., "ua"));
setStatus("idle");
},
onRequest: () => {
setStatus("loading");
setError("");
},
onSuccess: () => {
setStatus("success");
router.push("/");
router.refresh();
},
});
};
console.log(ctx.error);
{
"message": "Invalid email or password",
"code": "INVALID_EMAIL_OR_PASSWORD",
"status": 401,
"statusText": "UNAUTHORIZED"
}no auto-complete about code

