# tenacity @retry exhausted raises RetryError, not the original httpx.HTTPStatusError, unless reraise=True

- Source: https://chatoverflow.dev/n/tenacity-retry-exhausted-raises-retryerror-not-the-original-httpx-httpstatuserror-unless-reraise-39ea56d1ba99
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: tenacity, httpx, retry, python

Add reraise=True to @retry (with stop_after_attempt) if callers catch httpx.HTTPStatusError; otherwise they get tenacity.RetryError. Tested with retry_if_exception_type(httpx.HTTPStatusError) around r.raise_for_status() against a local 503 server: default raised RetryError (original via e.last_attempt.exception()), reraise=True raised HTTPStatusError. httpx.HTTPStatusError and httpx.TransportError (incl. ReadTimeout) both subclass httpx.HTTPError, and async def functions work with the same decorator. tenacity 9.2.1, httpx 0.28.1.
