This repository was archived by the owner on Aug 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
supabase_functions/_async Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 33from httpx import HTTPError , Response
44
55from ..errors import FunctionsHttpError , FunctionsRelayError
6- from ..utils import AsyncClient
6+ from ..utils import AsyncClient , is_valid_str_arg , is_https_url
77from ..version import __version__
88
99
@@ -16,6 +16,8 @@ def __init__(
1616 verify : bool = True ,
1717 proxy : Optional [str ] = None ,
1818 ):
19+ if not is_https_url (url ):
20+ ValueError ("url must be a valid HTTP URL string" )
1921 self .url = url
2022 self .headers = {
2123 "User-Agent" : f"supabase-py/functions-py v{ __version__ } " ,
@@ -25,7 +27,7 @@ def __init__(
2527 base_url = self .url ,
2628 headers = self .headers ,
2729 verify = bool (verify ),
28- timeout = timeout ,
30+ timeout = int ( abs ( timeout )) ,
2931 proxy = proxy ,
3032 follow_redirects = True ,
3133 http2 = True ,
@@ -73,6 +75,8 @@ async def invoke(
7375 `body`: the body of the request
7476 `responseType`: how the response should be parsed. The default is `json`
7577 """
78+ if not is_valid_str_arg (function_name ):
79+ raise ValueError ("function_name must a valid string value." )
7680 headers = self .headers
7781 body = None
7882 response_type = "text/plain"
You can’t perform that action at this time.
0 commit comments