mirror of
https://github.com/rendercv/rendercv.git
synced 2026-01-30 16:11:39 -05:00
Merge pull request #3 from LabAsim/main
raise error only if status code is 404
This commit is contained in:
@@ -961,8 +961,9 @@ class PublicationEntry(Event):
|
||||
|
||||
try:
|
||||
urllib.request.urlopen(doi_url)
|
||||
except urllib.request.HTTPError:
|
||||
raise ValueError(f"{doi} cannot be found in the DOI System 🤖")
|
||||
except urllib.request.HTTPError as err:
|
||||
if err.code == 404:
|
||||
raise ValueError(f"{doi} cannot be found in the DOI System 🤖")
|
||||
|
||||
return doi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user