mirror of https://git.sr.ht/~cadence/NewLeaf
Remove "unknown download error" prefix
The reason for the error is known and is returned.
This commit is contained in:
parent
7737ea3ba5
commit
e3595a455e
|
@ -184,8 +184,13 @@ def extract_video(id):
|
||||||
"error": "Received unexpected status code {}.".format(e.exc_info[1].code)
|
"error": "Received unexpected status code {}.".format(e.exc_info[1].code)
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
|
if e.exc_info and e.exc_info[1]:
|
||||||
|
message = str(e.exc_info[1])
|
||||||
|
message = message.replace("Video unavailable\n", "") # Remove redundant lead string, if present
|
||||||
|
else:
|
||||||
|
message = "Unknown extraction error."
|
||||||
result = {
|
result = {
|
||||||
"error": "Unknown download error: {}".format(e.exc_info[1])
|
"error": message
|
||||||
}
|
}
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
Loading…
Reference in New Issue