diff --git a/docs/quickstart.md b/docs/quickstart.md
index 6791578..f194215 100644
--- a/docs/quickstart.md
+++ b/docs/quickstart.md
@@ -267,9 +267,10 @@ We can raise an exception for any Client or Server error responses (4xx or 5xx s
 404
 >>> not_found.raise_for_status()
 Traceback (most recent call last):
-  File "/Users/tomchristie/GitHub/encode/httpcore/httpx/models.py", line 776, in raise_for_status
-    raise HTTPError(message)
-httpx.HTTPError: 404 Not Found
+  File "/Users/tomchristie/GitHub/encode/httpcore/httpx/models.py", line 837, in raise_for_status
+    raise HTTPStatusError(message, response=self)
+httpx._exceptions.HTTPStatusError: 404 Client Error: Not Found for url: https://httpbin.org/status/404
+For more information check: https://httpstatuses.com/404
 ```
 
 Any successful response codes will simply return `None` rather than raising an exception.
diff --git a/httpx/__init__.py b/httpx/__init__.py
index a45dd54..b88c9a8 100644
--- a/httpx/__init__.py
+++ b/httpx/__init__.py
@@ -10,6 +10,7 @@ from ._exceptions import (
     CookieConflict,
     DecodingError,
     HTTPError,
+    HTTPStatusError,
     InvalidURL,
     NetworkError,
     NotRedirectResponse,
@@ -66,6 +67,7 @@ __all__ = [
     "CookieConflict",
     "DecodingError",
     "HTTPError",
+    "HTTPStatusError",
     "InvalidURL",
     "NetworkError",
     "NotRedirectResponse",
diff --git a/httpx/_exceptions.py b/httpx/_exceptions.py
index ae07ec5..f36fafb 100644
--- a/httpx/_exceptions.py
+++ b/httpx/_exceptions.py
@@ -121,6 +121,17 @@ class DecodingError(HTTPError):
     """
 
 
+class HTTPStatusError(HTTPError):
+    """
+    Response sent an error HTTP status.
+    """
+
+    def __init__(self, *args: typing.Any, response: "Response") -> None:
+        super().__init__(*args)
+        self._request = response.request
+        self.response = response
+
+
 # Redirect exceptions...
 
 
diff --git a/httpx/_models.py b/httpx/_models.py
index 1ab162c..892a959 100644
--- a/httpx/_models.py
+++ b/httpx/_models.py
@@ -23,7 +23,7 @@ from ._decoders import (
 )
 from ._exceptions import (
     CookieConflict,
-    HTTPError,
+    HTTPStatusError,
     InvalidURL,
     NotRedirectResponse,
     RequestNotRead,
@@ -825,7 +825,7 @@ class Response:
 
     def raise_for_status(self) -> None:
         """
-        Raise the `HTTPError` if one occurred.
+        Raise the `HTTPStatusError` if one occurred.
         """
         message = (
             "{0.status_code} {error_type}: {0.reason_phrase} for url: {0.url}\n"
@@ -834,10 +834,10 @@ class Response:
 
         if StatusCode.is_client_error(self.status_code):
             message = message.format(self, error_type="Client Error")
-            raise HTTPError(message, response=self)
+            raise HTTPStatusError(message, response=self)
         elif StatusCode.is_server_error(self.status_code):
             message = message.format(self, error_type="Server Error")
-            raise HTTPError(message, response=self)
+            raise HTTPStatusError(message, response=self)
 
     def json(self, **kwargs: typing.Any) -> typing.Any:
         if self.charset_encoding is None and self.content and len(self.content) > 3:

Raise dedicated exception in `.raise_from_status()`
Refs #949, spun up from #1064.

Currently `Response.raise_from_status()` raises a generic `HTTPError` exception.

The problematic side is that it is not possible to catch it separately without also catching all exceptions originating from HTTPX (since `HTTPError` is the base exception class).

So we should probably introduce a dedicated exception class, namely something like `HTTPStatusError`.

_Note: there's an implementation of this in #869 but the PR also introduced some other changes (including renaming `HTTPError` to `RequestError` which is not really desirable as discussed in #1064)._
diff --git a/tests/client/test_async_client.py b/tests/client/test_async_client.py
index 7cb537a..aabee25 100644
--- a/tests/client/test_async_client.py
+++ b/tests/client/test_async_client.py
@@ -98,7 +98,7 @@ async def test_raise_for_status(server):
             )
 
             if 400 <= status_code < 600:
-                with pytest.raises(httpx.HTTPError) as exc_info:
+                with pytest.raises(httpx.HTTPStatusError) as exc_info:
                     response.raise_for_status()
                 assert exc_info.value.response == response
             else:
diff --git a/tests/client/test_client.py b/tests/client/test_client.py
index 6157aa5..40a5904 100644
--- a/tests/client/test_client.py
+++ b/tests/client/test_client.py
@@ -106,7 +106,7 @@ def test_raise_for_status(server):
                 "GET", server.url.copy_with(path=f"/status/{status_code}")
             )
             if 400 <= status_code < 600:
-                with pytest.raises(httpx.HTTPError) as exc_info:
+                with pytest.raises(httpx.HTTPStatusError) as exc_info:
                     response.raise_for_status()
                 assert exc_info.value.response == response
                 assert exc_info.value.request.url.path == f"/status/{status_code}"

pip install -e .
parse_log_pytest
requirements.txt
pytest pytest-asyncio pytest-trio pytest-cov pytest-xdist pytest-mock
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aspy.refactor-imports==3.0.2
async-generator==1.10
attrs==25.3.0
autoflake==2.3.1
babel==2.17.0
backports.tarfile==1.2.0
backrefs==5.8
black==25.1.0
brotlipy==0.7.0
certifi==2025.1.31
cffi==1.17.1
chardet==3.0.4
charset-normalizer==3.4.1
click==8.1.8
colorama==0.4.6
coverage==7.8.0
cryptography==44.0.2
docutils==0.21.2
exceptiongroup==1.2.2
execnet==2.1.1
flake8==7.2.0
flake8-bugbear==24.12.12
flake8-pie==0.16.0
ghp-import==2.1.0
h11==0.9.0
h2==3.2.0
hpack==3.0.0
hstspreload==2025.1.1
httpcore==0.9.1
-e git+https://github.com/encode/httpx.git@a89d4ad625aedeb1164e309acae4febb06b8cf5c#egg=httpx
hyperframe==5.2.0
id==1.5.0
idna==2.10
importlib_metadata==8.6.1
iniconfig==2.1.0
isort==5.13.2
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.1.0
jeepney==0.9.0
Jinja2==3.1.6
keyring==25.6.0
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==3.0.2
mccabe==0.7.0
mdurl==0.1.2
mergedeep==1.3.4
mkautodoc==0.2.0
mkdocs==1.6.1
mkdocs-get-deps==0.2.0
mkdocs-material==9.6.10
mkdocs-material-extensions==1.3.1
more-itertools==10.6.0
mypy==1.15.0
mypy-extensions==1.0.0
nh3==0.2.21
outcome==1.3.0.post0
packaging==24.2
paginate==0.5.7
pathspec==0.12.1
platformdirs==4.3.7
pluggy==1.5.0
pycodestyle==2.13.0
pycparser==2.22
pyflakes==3.3.2
Pygments==2.19.1
pymdown-extensions==10.14.3
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-trio==0.8.0
pytest-xdist==3.6.1
python-dateutil==2.9.0.post0
PyYAML==6.0.2
pyyaml_env_tag==0.1
readme_renderer==44.0
requests==2.32.3
requests-toolbelt==1.0.0
rfc3986==1.5.0
rich==14.0.0
SecretStorage==3.3.3
seed-isort-config==2.2.0
six==1.17.0
sniffio==1.3.1
sortedcontainers==2.4.0
tomli==2.2.1
trio==0.29.0
trio-typing==0.10.0
trustme==1.2.1
twine==6.1.0
typing_extensions==4.13.0
urllib3==2.3.0
uvicorn==0.34.0
watchdog==6.0.0
zipp==3.21.0

name: httpx
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aspy-refactor-imports==3.0.2
      - async-generator==1.10
      - attrs==25.3.0
      - autoflake==2.3.1
      - babel==2.17.0
      - backports-tarfile==1.2.0
      - backrefs==5.8
      - black==25.1.0
      - brotlipy==0.7.0
      - certifi==2025.1.31
      - cffi==1.17.1
      - chardet==3.0.4
      - charset-normalizer==3.4.1
      - click==8.1.8
      - colorama==0.4.6
      - coverage==7.8.0
      - cryptography==44.0.2
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - flake8==7.2.0
      - flake8-bugbear==24.12.12
      - flake8-pie==0.16.0
      - ghp-import==2.1.0
      - h11==0.9.0
      - h2==3.2.0
      - hpack==3.0.0
      - hstspreload==2025.1.1
      - httpcore==0.9.1
      - hyperframe==5.2.0
      - id==1.5.0
      - idna==2.10
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - isort==5.13.2
      - jaraco-classes==3.4.0
      - jaraco-context==6.0.1
      - jaraco-functools==4.1.0
      - jeepney==0.9.0
      - jinja2==3.1.6
      - keyring==25.6.0
      - markdown==3.7
      - markdown-it-py==3.0.0
      - markupsafe==3.0.2
      - mccabe==0.7.0
      - mdurl==0.1.2
      - mergedeep==1.3.4
      - mkautodoc==0.2.0
      - mkdocs==1.6.1
      - mkdocs-get-deps==0.2.0
      - mkdocs-material==9.6.10
      - mkdocs-material-extensions==1.3.1
      - more-itertools==10.6.0
      - mypy==1.15.0
      - mypy-extensions==1.0.0
      - nh3==0.2.21
      - outcome==1.3.0.post0
      - packaging==24.2
      - paginate==0.5.7
      - pathspec==0.12.1
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pycparser==2.22
      - pyflakes==3.3.2
      - pygments==2.19.1
      - pymdown-extensions==10.14.3
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-trio==0.8.0
      - pytest-xdist==3.6.1
      - python-dateutil==2.9.0.post0
      - pyyaml==6.0.2
      - pyyaml-env-tag==0.1
      - readme-renderer==44.0
      - requests==2.32.3
      - requests-toolbelt==1.0.0
      - rfc3986==1.5.0
      - rich==14.0.0
      - secretstorage==3.3.3
      - seed-isort-config==2.2.0
      - six==1.17.0
      - sniffio==1.3.1
      - sortedcontainers==2.4.0
      - tomli==2.2.1
      - trio==0.29.0
      - trio-typing==0.10.0
      - trustme==1.2.1
      - twine==6.1.0
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - uvicorn==0.34.0
      - watchdog==6.0.0
      - zipp==3.21.0
prefix: /opt/conda/envs/httpx

tests/client/test_async_client.py::test_raise_for_status[asyncio] tests/client/test_async_client.py::test_raise_for_status[trio] tests/client/test_client.py::test_raise_for_status
tests/client/test_async_client.py::test_get[asyncio] tests/client/test_async_client.py::test_get[trio] tests/client/test_async_client.py::test_get_invalid_url[asyncio] tests/client/test_async_client.py::test_get_invalid_url[trio] tests/client/test_async_client.py::test_build_request[asyncio] tests/client/test_async_client.py::test_build_request[trio] tests/client/test_async_client.py::test_post[asyncio] tests/client/test_async_client.py::test_post[trio] tests/client/test_async_client.py::test_post_json[asyncio] tests/client/test_async_client.py::test_post_json[trio] tests/client/test_async_client.py::test_stream_response[asyncio] tests/client/test_async_client.py::test_stream_response[trio] tests/client/test_async_client.py::test_access_content_stream_response[asyncio] tests/client/test_async_client.py::test_access_content_stream_response[trio] tests/client/test_async_client.py::test_stream_request[asyncio] tests/client/test_async_client.py::test_stream_request[trio] tests/client/test_async_client.py::test_options[asyncio] tests/client/test_async_client.py::test_options[trio] tests/client/test_async_client.py::test_head[asyncio] tests/client/test_async_client.py::test_head[trio] tests/client/test_async_client.py::test_put[asyncio] tests/client/test_async_client.py::test_put[trio] tests/client/test_async_client.py::test_patch[asyncio] tests/client/test_async_client.py::test_patch[trio] tests/client/test_async_client.py::test_delete[asyncio] tests/client/test_async_client.py::test_delete[trio] tests/client/test_async_client.py::test_100_continue[asyncio] tests/client/test_async_client.py::test_100_continue[trio] tests/client/test_client.py::test_get tests/client/test_client.py::test_build_request tests/client/test_client.py::test_build_post_request tests/client/test_client.py::test_post tests/client/test_client.py::test_post_json tests/client/test_client.py::test_stream_response tests/client/test_client.py::test_stream_iterator tests/client/test_client.py::test_raw_iterator tests/client/test_client.py::test_options tests/client/test_client.py::test_head tests/client/test_client.py::test_put tests/client/test_client.py::test_patch tests/client/test_client.py::test_delete tests/client/test_client.py::test_base_url tests/client/test_client.py::test_merge_url
httpx/_exceptions.py httpx/__init__.py docs/quickstart.md httpx/_models.py
httpx/_exceptions.py httpx/__init__.py docs/quickstart.md httpx/_models.py