From ff9379ffb7ac6877605620ea875f9583d537b06e Mon Sep 17 00:00:00 2001 From: bill bittner Date: Mon, 30 Oct 2017 14:57:50 -0700 Subject: [PATCH] updated handling for incorrect claim names --- controllers/serveController.js | 4 +++- views/noChannel.handlebars | 2 +- views/noClaim.handlebars | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/controllers/serveController.js b/controllers/serveController.js index 16d5ac67..bbc96dab 100644 --- a/controllers/serveController.js +++ b/controllers/serveController.js @@ -12,6 +12,7 @@ const NO_CHANNEL = 'NO_CHANNEL'; const NO_CLAIM = 'NO_CLAIM'; function checkForLocalAssetByClaimId (claimId, name) { + logger.debug(`checkForLocalAssetsByClaimId(${claimId}, ${name}`); return new Promise((resolve, reject) => { db.File .findOne({where: { name, claimId }}) @@ -69,7 +70,8 @@ function getAssetByLongClaimId (fullClaimId, name) { logger.debug('resolve result >> ', resolveResult); // if no result, return early (claim doesn't exist or isn't free) if (!resolveResult) { - return resolve(null); + resolve(NO_CLAIM); + return; } let fileRecord = {}; // get the claim diff --git a/views/noChannel.handlebars b/views/noChannel.handlebars index 19476180..6f43d584 100644 --- a/views/noChannel.handlebars +++ b/views/noChannel.handlebars @@ -1,4 +1,4 @@ -
+

No Channel

There are no published channels matching your url

If you think this message is an error, contact us in the LBRY Discord!

diff --git a/views/noClaim.handlebars b/views/noClaim.handlebars index 6cc37965..86273814 100644 --- a/views/noClaim.handlebars +++ b/views/noClaim.handlebars @@ -1,4 +1,4 @@ -
+

No Claims

There are no free assets at that claim. You should publish one at spee.ch.

NOTE: it is possible your claim was published, but it is still being processed by the blockchain