Skip to content

build_request raises raw httpx2.InvalidURL while every other entry point maps it #175

Closed

Description

@lesnik512

Since 0.22.0, an invalid URL passed to a verb method, request() or a *_with_response method raises TransportError, with the httpx2.InvalidURL as __cause__. Client.build_request and AsyncClient.build_request still raise the raw httpx2.InvalidURL:

import httpware

httpware.Client().build_request("GET", "https://example.test/\x00")
# httpx2.InvalidURL

build_request delegates straight to httpx2, and ADR-0008 makes httpx2 public surface, so the raw error may be the intended behaviour here. Either map it like the other entry points or say in the docstring that build_request raises httpx2 errors.

Activity

  1. added
    bugSomething isn't working
    needs-triageMaintainer needs to evaluate this issue
    on Oct 17, 2026
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

    bugSomething isn't workingneeds-triageMaintainer needs to evaluate this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions