forked from LBRYCommunity/lbry-sdk
log and handle misformed claims from #1611
This commit is contained in:
parent
457a56ce04
commit
8394dcb663
1 changed files with 6 additions and 0 deletions
|
@ -415,6 +415,12 @@ def _decode_claim_result(claim):
|
|||
if not claim['signature_is_valid']:
|
||||
log.warning("lbry://%s#%s has an invalid signature",
|
||||
claim['name'], claim['claim_id'])
|
||||
if 'value' not in claim:
|
||||
log.warning('Got an invalid claim while parsing, please report: %s', claim)
|
||||
claim['hex'] = None
|
||||
claim['value'] = None
|
||||
claim['error'] = "Failed to parse: missing value"
|
||||
return claim
|
||||
try:
|
||||
decoded = smart_decode(claim['value'])
|
||||
claim_dict = decoded.claim_dict
|
||||
|
|
Loading…
Reference in a new issue