fix: unwrap to throw error

This commit is contained in:
Paul Pan 2024-03-17 15:48:52 +08:00
parent ffd21e62c9
commit 1768384ce5

View File

@ -85,7 +85,7 @@ export default function LoginPage() {
try {
// authSlice will automatically handle the response
await login(formState);
await login(formState).unwrap();
navigate("/");
} catch (err) {
const errTyped = err as { status: number | string; data: Wrap<void> };