Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

handle errors on login #18

Open
betsaleel777 opened this issue Apr 21, 2023 · 5 comments
Open

handle errors on login #18

betsaleel777 opened this issue Apr 21, 2023 · 5 comments
Milestone

Comments

@betsaleel777
Copy link

async function onSubmit(values: any) { try { await $sanctumAuth.login(values, (data) => { navigateTo("/"); console.log(data); }); } catch (error) { const fail = error as FetchError; console.log(fail); } }
I can't handle errors or recover from them, console.log() do not work, that display nothing

@kreejzak
Copy link
Collaborator

Hi, I will look at this in few days. Thanks for your patiance.

@rambii
Copy link

rambii commented May 17, 2023

Just ran a quick test of the snippet @betsaleel777 (without the TS type definitions)posted. It works for me and prints the error like it's supposed to.

@kreejzak
Copy link
Collaborator

Hi, right now I'm working on major rewrite that will include better error handling alongside better type support.
Stay tuned

image

@kreejzak kreejzak added this to the 1.0 milestone May 19, 2023
@YoungMayor
Copy link

Hello, I was wondering if there was an ETA on the next major release.

I really appreciate this package
Thanks

@kreejzak
Copy link
Collaborator

Hello, still in progress. Unfortunately I have less time than anticipated. Will try to push it faster.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants