We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 900faf3 commit eac3d5bCopy full SHA for eac3d5b
src/py/pyodide/http.py
@@ -216,8 +216,8 @@ def _raise_if_failed(self) -> None:
216
raise BodyUsedError
217
218
def raise_for_status(self) -> None:
219
- """Raise an :py:exc:`OSError` if the status of the response is an error (4xx or 5xx)"""
220
- if 400 <= self.status < 600:
+ """Raise an :py:class:`HttpStatusError` if the status of the response is an error (400 or more.)"""
+ if 400 <= self.status:
221
raise HttpStatusError(self.status, self.status_text, self.url)
222
223
def clone(self) -> "FetchResponse":
0 commit comments