-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(#253): add descriptive login error messages #254
base: main
Are you sure you want to change the base?
Conversation
Hi @kennsippell I thought of different ways to design the solution and came up with this. Please share your thoughts of it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Tested this today with uasingishu instance. The login fails due to cert errors. I'm seeing the response hang and no error message ever appear. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lookin' good!
return new AuthError('Missing username or password'); | ||
} | ||
|
||
static TOKEN_CREATION_FAILED(username: string, domain: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add scenario where instance is offline? This is quite a common scenario
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
I'm thinking we could use it in createSessionToken
by checking if (e.code === 'ENOTFOUND')
? would that be sufficient to know the instance is offline ? @kennsippell
d9ca2d5
to
4188d7a
Compare
Makes login error messages more descriptive.
Closes #253