fix login error
This commit is contained in:
@@ -91,7 +91,12 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children }) => {
|
||||
});
|
||||
|
||||
// Show error notification
|
||||
notification.showError('Anmeldung fehlgeschlagen. Bitte versuchen Sie es erneut.');
|
||||
const is429 = error && typeof error === 'object' && 'status' in error && (error as any).status === 429;
|
||||
notification.showError(
|
||||
is429
|
||||
? 'Zu viele Anmeldeversuche. Bitte warten Sie einige Minuten und versuchen Sie es erneut.'
|
||||
: 'Anmeldung fehlgeschlagen. Bitte versuchen Sie es erneut.'
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
}, [notification]);
|
||||
|
||||
Reference in New Issue
Block a user