Skip to content

Commit

Permalink
Improve login error popup messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dhzdhd committed Nov 9, 2023
1 parent 99010c1 commit 793cf40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/routes/auth/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const actions = {
const data = await response.json();

if (response.status !== 200) {
return fail(response.status, { message: JSON.stringify(data) });
return fail(response.status, { message: data.error.message });
}

cookies.set('sessionjwt', data.jwt);
Expand Down Expand Up @@ -53,7 +53,7 @@ export const actions = {
const data = await response.json();

if (response.status !== 200) {
return fail(response.status, { message: JSON.stringify(data) });
return fail(response.status, { message: data.error.message });
}

cookies.set('sessionjwt', data.jwt);
Expand Down

0 comments on commit 793cf40

Please sign in to comment.