improved error messages in models
This commit is contained in:
parent
044b98a209
commit
af35bb6073
2 changed files with 2 additions and 2 deletions
|
@ -112,7 +112,7 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT }) => {
|
||||||
.then(result => {
|
.then(result => {
|
||||||
switch (result.length) {
|
switch (result.length) {
|
||||||
case 0:
|
case 0:
|
||||||
throw new Error('That is an invalid channel name');
|
throw new Error('No channel(s) found with that channel name');
|
||||||
default:
|
default:
|
||||||
return resolve(returnShortId(result, longChannelId));
|
return resolve(returnShortId(result, longChannelId));
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, ARRAY, DECIMAL, D
|
||||||
.then(result => {
|
.then(result => {
|
||||||
switch (result.length) {
|
switch (result.length) {
|
||||||
case 0:
|
case 0:
|
||||||
throw new Error('That is an invalid claim name');
|
throw new Error('No claim(s) found with that claim name');
|
||||||
default:
|
default:
|
||||||
resolve(returnShortId(result, claimId));
|
resolve(returnShortId(result, claimId));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue