Merge pull request #266 from lbryio/model-error-messages

improved error messages in models
This commit is contained in:
Bill Bittner 2017-11-14 17:54:04 -05:00 committed by GitHub
commit 0a64d57afa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -112,7 +112,7 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT }) => {
.then(result => {
switch (result.length) {
case 0:
throw new Error('That is an invalid channel name');
throw new Error('No channel(s) found with that channel name');
default:
return resolve(returnShortId(result, longChannelId));
}

View file

@ -169,7 +169,7 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, ARRAY, DECIMAL, D
.then(result => {
switch (result.length) {
case 0:
throw new Error('That is an invalid claim name');
throw new Error('No claim(s) found with that claim name');
default:
resolve(returnShortId(result, claimId));
}