Visitar URL original
Raise an exception on HTTP error codes · cjolowicz/hypermodern-python@2438a6a · GitHub
Skip to content

Commit 2438a6a

Browse files
author
Claudio Jolowicz
committed
Raise an exception on HTTP error codes
1 parent cf91826 commit 2438a6a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎src/hypermodern_python/console.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
def main():
1515
"""The hypermodern Python project."""
1616
with requests.get(API_URL) as response:
17+
response.raise_for_status()
1718
data = response.json()
1819

1920
title = data["title"]

0 commit comments

Comments
 (0)