Skip to content

Commit b2b8d1a

Browse files
committed
Tweak this error message to be more descriptive
https://topcoder.atlassian.net/browse/PROD-4411
1 parent f52aed5 commit b2b8d1a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/routes/projectMemberInvites/create.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ module.exports = [
301301
const members = req.context.currentProjectMembers;
302302
const projectId = _.parseInt(req.params.projectId);
303303
// check user handle exists in returned result
304-
const errorMessageHandleNotExist = 'User with such handle does not exist';
304+
const errorMessageHandleNotExist = 'We couldn\'t find a user with the provided username. ' +
305+
'Please ensure that the username is accurate, including its letter casing. ' +
306+
'If you\'re still having trouble, double-check the spelling and try again.';
305307
if (!!invite.handles && invite.handles.length > 0) {
306308
const lowerCaseHandles = invite.handles.map(handle => handle.toLowerCase());
307309
const existentHandles = _.map(inviteUsers, 'handleLower');

src/routes/projectMemberInvites/create.spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,9 @@ describe.skip('Project Member Invite create', () => {
655655
const resJson = res.body.failed[0];
656656
should.exist(resJson);
657657
resJson.handle.should.equal('invalid_handle');
658-
resJson.message.should.equal('User with such handle does not exist');
658+
resJson.message.should.equal('We couldn\'t find a user with the provided username. ' +
659+
'Please ensure that the username is accurate, including its letter casing. ' +
660+
'If you\'re still having trouble, double-check the spelling and try again.');
659661
done();
660662
}
661663
});

0 commit comments

Comments
 (0)