Skip to content
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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Benmuiruri
Copy link
Contributor

Makes login error messages more descriptive.

Closes #253

@Benmuiruri
Copy link
Contributor Author

Hi @kennsippell I thought of different ways to design the solution and came up with this. Please share your thoughts of it.

@Benmuiruri Benmuiruri marked this pull request as ready for review February 11, 2025 13:09
Copy link
Member

@kennsippell kennsippell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@kennsippell
Copy link
Member

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.

Copy link
Member

@kennsippell kennsippell left a 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) {
Copy link
Member

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

Copy link
Contributor Author

@Benmuiruri Benmuiruri Feb 19, 2025

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

@Benmuiruri Benmuiruri force-pushed the 253-descriptie-error-msgs branch from d9ca2d5 to 4188d7a Compare February 21, 2025 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Descriptive messages as-to why login fails
2 participants