-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fixed Improvements to error messaging issue #1091 #1166
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6057930
Fixed Improvements to error messaging issue #1091
devkashan1 e97b93c
Linter fixes, added 2 spaces.
devkashan1 30ad015
Fixed a couple of spaces
devkashan1 687f758
Fixed a few move lines
devkashan1 f6c220e
Fixed spaces issues.
devkashan1 9c4a69e
property shorthand fixed
devkashan1 c03e278
object-shorthand fixed
devkashan1 3f15c26
fixed the error messages
devkashan1 8a0b114
removed type
devkashan1 d5a16a0
typo fixed and changed the description of function
devkashan1 0496c93
Moved & changed the function in Session.js
devkashan1 677448f
moved the function to API.js
devkashan1 5212bc6
Linter fixes
devkashan1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const authenticationErrorMessages = [ | ||
{ | ||
errorCode: 401, | ||
errorMessage: 'Incorrect login or password. Please try again.', | ||
}, | ||
{ | ||
errorCode: 402, | ||
errorMessage: | ||
'You have 2FA enabled on this account. Please sign in using your email or phone number.', | ||
}, | ||
{ | ||
errorCode: 403, | ||
errorMessage: | ||
'Invalid login or password. Please try again or reset your password.', | ||
}, | ||
{ | ||
errorCode: 404, | ||
errorMessage: | ||
'We were unable to change your password. This is likely due to an expired password reset link in an old password reset email. We have emailed you a new link so you can try again. Check your Inbox and your Spam folder; it should arrive in just a few minutes.', | ||
}, | ||
{ | ||
errorCode: 405, | ||
errorMessage: | ||
'You do not have access to this application. Please add your GitHub username for access.', | ||
}, | ||
{ | ||
errorCode: 413, | ||
errorMessage: 'Your account has been locked.', | ||
}, | ||
]; | ||
export default authenticationErrorMessages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Ah what I meant was that you should probably place this in
Authenticate
. I also think you don't need a separate authenticationErrorMessages file either. It's overkill for what we're trying to achieve IMOThere 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.
What I understood where you mentioned place in
Authenticate
. This means insrc\libs\actions\Session.js
file. So, This functionGetSignInErrorMessage
should be in thissrc\libs\actions\Session.js
file, and no need separate file forauthenticationErrorMessages
. If you confirm me so I can proceed the changes.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.
@yuwenmemon Could you please confirm so I can push and close it?