improve error when get fails to decode the resolved claim

This commit is contained in:
Jack Robison 2018-11-19 15:00:09 -05:00
parent db0b5961b3
commit cc8b47d882
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -1827,7 +1827,8 @@ class Daemon(AuthJSONRPCServer):
raise ResolveError(
"Failed to resolve stream at lbry://{}".format(uri.replace("lbry://", ""))
)
if 'error' in resolved:
raise ResolveError(f"error resolving stream: {resolved['error']}")
txid, nout, name = resolved['txid'], resolved['nout'], resolved['name']
claim_dict = ClaimDict.load_dict(resolved['value'])
sd_hash = claim_dict.source_hash.decode()