From 9e3963ba23abf2f9ace4654089a7df1fd553f121 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 30 Jun 2022 12:37:12 -0400 Subject: [PATCH] fix resolve error messages --- hub/db/db.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hub/db/db.py b/hub/db/db.py index 1091845..23c87c3 100644 --- a/hub/db/db.py +++ b/hub/db/db.py @@ -417,10 +417,19 @@ class SecondaryDB: results[url] = ExpandedResolveResult( None, LookupError(f'Could not find channel in "{url}".'), None, None ) - elif not isinstance(parsed, Exception) and (parsed.has_stream_in_channel or parsed.has_stream): + elif not isinstance(parsed, Exception) and not parsed.has_channel and parsed.has_stream: results[url] = ExpandedResolveResult( LookupError(f'Could not find claim at "{url}".'), None, None, None ) + elif not isinstance(parsed, Exception) and parsed.has_stream_in_channel: + if reverse_mapping_outer_layer_claims.get(url) is None: + results[url] = ExpandedResolveResult( + None, LookupError(f'Could not find channel in "{url}".'), None, None + ) + else: + results[url] = ExpandedResolveResult( + LookupError(f'Could not find claim at "{url}".'), None, None, None + ) elif isinstance(parsed, ValueError): results[url] = ExpandedResolveResult( parsed, None, None, None