Skip to content

Commit 62d08df

Browse files
author
Tyler Wozniak
committed
Updated to include type in error message
1 parent 1f78c19 commit 62d08df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httpx/_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__(self, url: URLTypes = "", params: QueryParamTypes = None) -> None:
7474
elif isinstance(url, URL):
7575
self._uri_reference = url._uri_reference
7676
else:
77-
raise TypeError("Invalid type for url. Expected str or httpx.URL")
77+
raise TypeError(f"Invalid type for url. Expected str or httpx.URL, got {type(url)}")
7878

7979
# Add any query parameters, merging with any in the URL if needed.
8080
if params:

0 commit comments

Comments
 (0)