diff --git a/rendercv/data_model.py b/rendercv/data_model.py index da6b226..9b321d0 100644 --- a/rendercv/data_model.py +++ b/rendercv/data_model.py @@ -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