]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Update exceptions.md (#1432)
authorGerhard van Andel <AsynchronousGillz@users.noreply.github.com>
Sun, 20 Dec 2020 19:43:33 +0000 (19:43 +0000)
committerGitHub <noreply@github.com>
Sun, 20 Dec 2020 19:43:33 +0000 (20:43 +0100)
docs/exceptions.md

index 1bc86100db8405fe8183a4c7e8d7357946f324d3..949ac47a19f0768dd8a9f16ae9f5abc4b3b35a40 100644 (file)
@@ -11,7 +11,7 @@ while issuing an HTTP request. These exceptions include a `.request` attribute.
 try:
     response = httpx.get("https://www.example.com/")
 except httpx.RequestError as exc:
-    print(f"An error occured while requesting {exc.request.url!r}.")
+    print(f"An error occurred while requesting {exc.request.url!r}.")
 ```
 
 The `HTTPStatusError` class is raised by `response.raise_for_status()` on 4xx and 5xx responses.
@@ -45,7 +45,7 @@ try:
     response = httpx.get("https://www.example.com/")
     response.raise_for_status()
 except httpx.RequestError as exc:
-    print(f"An error occured while requesting {exc.request.url!r}.")
+    print(f"An error occurred while requesting {exc.request.url!r}.")
 except httpx.HTTPStatusError as exc:
     print(f"Error response {exc.response.status_code} while requesting {exc.request.url!r}.")
 ```