Skip to content

socket.gaierror under trio not casted into httpx.ConnectError #1369

Closed

Description

@kontsaki

Hello

Checklist

  • The bug is reproducible against the latest release and/or master.
  • There are no similar issues or pull requests to fix it yet.

To reproduce

import httpx
import trio


async def test():
    async with httpx.AsyncClient() as client:
        try:
            await client.get("http://thisdoesnotexistasdf.com")
        except httpx.ConnectError:
            print("oops")

trio.run(test)

Expected behavior

should raise httpx.ConnectError

Actual behavior

raises socket.gaierror

Environment

  • OS: linux
  • Python version: 3.8.5
  • HTTPX version: 0.16.1 and master 1bc3b01
  • Async environment: trio, not happening on asyncio
  • trio version: 0.17.0

Activity

  1. jcugat commented on Oct 27, 2020

    @jcugat
    Contributor

    Thanks for reporting this! It's an httpcore issue that was just fixed yesterday in encode/httpcore#225

  2. kontsaki commented on Oct 27, 2020

    @kontsaki
    Author

    oh i should have searched through httpcore issues as well, thank you!

  3. florimondmanca commented on Oct 27, 2020

    @florimondmanca
    Contributor

    Still meaning to issue a bug fix release on the HTTPCore side, hopefully tomorrow, but feel free to ping. :)

  4. jcugat commented on Oct 28, 2020

    @jcugat
    Contributor

    No worries @kontsaki 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions