show error when send email fails

This commit is contained in:
Ivan Socolsky 2014-12-17 17:16:05 -03:00
commit be6811cb4a
5 changed files with 9 additions and 7 deletions

View file

@ -198,6 +198,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');
}