Merge pull request #2191 from isocolsky/send_error

Give feedback when email cannot be verified (as per Insight)
This commit is contained in:
Matias Alejo Garcia 2014-12-18 19:18:46 -03:00
commit f886e36481
5 changed files with 9 additions and 7 deletions

View file

@ -223,6 +223,8 @@ InsightStorage.prototype.setItem = function(name, value, callback) {
return callback('BADCREDENTIALS: Invalid username or password');
} else if (response.statusCode === 406) {
return callback('OVERQUOTA: Quota exceeded');
} else if (response.statusCode === 501) {
return callback('EMAILERROR: Error sending verification email');
} else if (response.statusCode !== 200) {
return callback('Unable to store data on insight');
}