add descriptive message to failed account linking attempt

This commit is contained in:
Quincy Larson
2015-08-24 17:52:12 -07:00
parent 9fc3fd72b1
commit fd440916a8

View File

@ -49,7 +49,7 @@ export default function({ models }) {
}
if (identity.userId.toString() !== userId.toString()) {
return Observable.throw(
new Error('An account is already linked to that profile')
new Error("It looks like you already have an account associated with that sign in method. Here's what you can do: 1) Sign out of this account. 2) Use that sign in method to sign into your other account. 3) Delete that account. 4) Then sign back into this account and you'll be able to link it here. If you need help, send us an email at team@freecodecamp.com.")
);
}
identity.credentials = credentials;