From af35bb6073bdcc033191a9b4fbc4e0aa3ace0721 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Tue, 14 Nov 2017 17:52:20 -0500 Subject: [PATCH] improved error messages in models --- models/certificate.js | 2 +- models/claim.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/certificate.js b/models/certificate.js index 19ad8b39..ea29e1a4 100644 --- a/models/certificate.js +++ b/models/certificate.js @@ -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)); } diff --git a/models/claim.js b/models/claim.js index cb6a6d7a..ab39eecf 100644 --- a/models/claim.js +++ b/models/claim.js @@ -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)); } -- 2.45.2