Skip to content

Commit 6c67c60

Browse files
committed
correctly raise error for OPM request
1 parent 6fe0a2d commit 6c67c60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

moleculekit/opm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def get_opm_pdb(pdbid, keep=False, keepaltloc="A", validateElements=False):
142142
resp = requests.get(
143143
f"https://storage.googleapis.com/opm-assets/pdb/{pdbid.lower()}.pdb"
144144
)
145+
resp.raise_for_status()
145146
except Exception as e:
146147
raise RuntimeError(f"Failed to fetch OPM with PDB ID {pdbid} with error {e}")
147148

0 commit comments

Comments
 (0)