Преглед изворни кода

Allow request to raise if status code is >= 400

jherve пре 1 година
родитељ
комит
a1680f1c84
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      src/de_quoi_parle_le_monde/http.py

+ 1 - 0
src/de_quoi_parle_le_monde/http.py

@@ -38,6 +38,7 @@ class HttpSession:
 
     async def get(self, url, params=None):
         async with self.session.get(url, allow_redirects=True, params=params) as resp:
+            resp.raise_for_status()
             return await resp.text()
 
     async def __aenter__(self):