feat: implement one-time token
This commit is contained in:
@@ -63,9 +63,9 @@ export const SetPassword = () => {
|
||||
|
||||
if (!resp.ok) {
|
||||
if (resp.status === 401) {
|
||||
resp.statusText
|
||||
? setError(resp.statusText)
|
||||
: setError("unauthorized");
|
||||
const { detail } = await resp.json();
|
||||
if (detail) setError(detail);
|
||||
else setError("unauthorized");
|
||||
throw new Error("Unauthorized");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user