Skip to content

Commit

Permalink
fix: throw error instead of type error login
Browse files Browse the repository at this point in the history
  • Loading branch information
Intevel committed Jul 11, 2022
1 parent af14019 commit fa310a2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/runtime/composables/useDirectusAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const useDirectusAuth = () => {
}
);

if(!response.data.access_token) throw new Error("Login failed, please check your credentials.")
setToken(response.data.access_token);

const user = await fetchUser();
Expand Down

0 comments on commit fa310a2

Please sign in to comment.