Skip to content

Commit a6f4e00

Browse files
author
Lasim
committed
fix: update error handling to include Bad Request status for invalid credentials
1 parent d9fe33e commit a6f4e00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/frontend/src/views/Login.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ const handleError = (error: LoginError) => {
7979
if (error.name === 'TypeError' && error.message && error.message.includes('fetch')) {
8080
// Network error - backend is down
8181
errorMessage.value = t('login.errors.networkError')
82-
} else if (error.status && error.status === 401) {
83-
// Unauthorized - invalid credentials
82+
} else if (error.status && (error.status === 400 || error.status === 401)) {
83+
// Bad Request or Unauthorized - invalid credentials
8484
errorMessage.value = t('login.errors.invalidCredentials')
8585
} else if (error.status && error.status >= 500) {
8686
// Server error

0 commit comments

Comments
 (0)