Skip to content

Commit

Permalink
fix: add more failure messages for item login refactoring (#501)
Browse files Browse the repository at this point in the history
* feat: invalid membertype failure messages

* feat: account not found error message

---------

Co-authored-by: Jeremy Defferrard <[email protected]>
  • Loading branch information
spaenleh and Defferrard authored Aug 22, 2024
1 parent 8862c87 commit ba80afc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/constants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export const FAILURE_MESSAGES = {
// auth
INSUFFICIENT_PERMISSION: 'INSUFFICIENT_PERMISSION',
NOT_VALIDATED_MEMBER: 'NOT_VALIDATED_MEMBER',
NOT_A_MEMBER: 'NOT_A_MEMBER',
NOT_A_GUEST: 'NOT_A_GUEST',

// password
PASSWORD_EMPTY_ERROR: 'Please enter a valid password',
Expand Down Expand Up @@ -118,6 +120,7 @@ export const FAILURE_MESSAGES = {
MEMBERSHIP_ALREADY_EXISTS: 'MEMBERSHIP_ALREADY_EXISTS',
MEMBERSHIP_REQUEST_ALREADY_EXISTS: 'MEMBERSHIP_REQUEST_ALREADY_EXISTS',
MEMBERSHIP_REQUEST_NOT_FOUND: 'MEMBERSHIP_REQUEST_NOT_FOUND',
ACCOUNT_NOT_FOUND: 'ACCOUNT_NOT_FOUND',
};

export const DEFAULT_FAILURE_MESSAGE = FAILURE_MESSAGES.UNEXPECTED_ERROR;
Expand Down
5 changes: 4 additions & 1 deletion src/langs/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,8 @@
"INVITATION_CANNOT_CREATE_STRUCTURE_IN_NON_FOLDER_ITEM": "Provided item is not a folder. A structure cannot be created inside an item that is not a folder.",
"MEMBERSHIP_ALREADY_EXISTS": "This account already has access to this item.",
"MEMBERSHIP_REQUEST_ALREADY_EXISTS": "This account has already requested a membership to the provided item.",
"MEMBERSHIP_REQUEST_NOT_FOUND": "Provided Membership Request not found."
"MEMBERSHIP_REQUEST_NOT_FOUND": "Provided Membership Request not found.",
"NOT_A_MEMBER": "Your account is not registered as a valid member",
"NOT_A_GUEST": "Your account is not registered as a valid pseudonimized user",
"ACCOUNT_NOT_FOUND": "An account was not found"
}

0 comments on commit ba80afc

Please sign in to comment.