supabase_functions 0.9.3__tar.gz → 0.9.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {supabase_functions-0.9.3 → supabase_functions-0.9.4}/PKG-INFO +1 -1
- {supabase_functions-0.9.3 → supabase_functions-0.9.4}/pyproject.toml +1 -1
- {supabase_functions-0.9.3 → supabase_functions-0.9.4}/supabase_functions/_async/functions_client.py +6 -1
- {supabase_functions-0.9.3 → supabase_functions-0.9.4}/supabase_functions/_sync/functions_client.py +6 -1
- {supabase_functions-0.9.3 → supabase_functions-0.9.4}/supabase_functions/errors.py +4 -4
- supabase_functions-0.9.4/supabase_functions/version.py +1 -0
- supabase_functions-0.9.3/supabase_functions/version.py +0 -1
- {supabase_functions-0.9.3 → supabase_functions-0.9.4}/LICENSE +0 -0
- {supabase_functions-0.9.3 → supabase_functions-0.9.4}/README.md +0 -0
- {supabase_functions-0.9.3 → supabase_functions-0.9.4}/supabase_functions/__init__.py +0 -0
- {supabase_functions-0.9.3 → supabase_functions-0.9.4}/supabase_functions/_async/__init__.py +0 -0
- {supabase_functions-0.9.3 → supabase_functions-0.9.4}/supabase_functions/_sync/__init__.py +0 -0
- {supabase_functions-0.9.3 → supabase_functions-0.9.4}/supabase_functions/utils.py +0 -0
{supabase_functions-0.9.3 → supabase_functions-0.9.4}/supabase_functions/_async/functions_client.py
RENAMED
|
@@ -54,9 +54,14 @@ class AsyncFunctionsClient:
|
|
|
54
54
|
try:
|
|
55
55
|
response.raise_for_status()
|
|
56
56
|
except HTTPError as exc:
|
|
57
|
+
status_code = None
|
|
58
|
+
if hasattr(response, "status_code"):
|
|
59
|
+
status_code = response.status_code
|
|
60
|
+
|
|
57
61
|
raise FunctionsHttpError(
|
|
58
62
|
response.json().get("error")
|
|
59
|
-
or f"An error occurred while requesting your edge function at {exc.request.url!r}."
|
|
63
|
+
or f"An error occurred while requesting your edge function at {exc.request.url!r}.",
|
|
64
|
+
status_code,
|
|
60
65
|
) from exc
|
|
61
66
|
|
|
62
67
|
return response
|
{supabase_functions-0.9.3 → supabase_functions-0.9.4}/supabase_functions/_sync/functions_client.py
RENAMED
|
@@ -54,9 +54,14 @@ class SyncFunctionsClient:
|
|
|
54
54
|
try:
|
|
55
55
|
response.raise_for_status()
|
|
56
56
|
except HTTPError as exc:
|
|
57
|
+
status_code = None
|
|
58
|
+
if hasattr(response, "status_code"):
|
|
59
|
+
status_code = response.status_code
|
|
60
|
+
|
|
57
61
|
raise FunctionsHttpError(
|
|
58
62
|
response.json().get("error")
|
|
59
|
-
or f"An error occurred while requesting your edge function at {exc.request.url!r}."
|
|
63
|
+
or f"An error occurred while requesting your edge function at {exc.request.url!r}.",
|
|
64
|
+
status_code,
|
|
60
65
|
) from exc
|
|
61
66
|
|
|
62
67
|
return response
|
|
@@ -25,20 +25,20 @@ class FunctionsError(Exception):
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class FunctionsHttpError(FunctionsError):
|
|
28
|
-
def __init__(self, message: str) -> None:
|
|
28
|
+
def __init__(self, message: str, code: int | None = None) -> None:
|
|
29
29
|
super().__init__(
|
|
30
30
|
message,
|
|
31
31
|
"FunctionsHttpError",
|
|
32
|
-
400,
|
|
32
|
+
400 if code is None else code,
|
|
33
33
|
)
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
class FunctionsRelayError(FunctionsError):
|
|
37
37
|
"""Base exception for relay errors."""
|
|
38
38
|
|
|
39
|
-
def __init__(self, message: str) -> None:
|
|
39
|
+
def __init__(self, message: str, code: int | None = None) -> None:
|
|
40
40
|
super().__init__(
|
|
41
41
|
message,
|
|
42
42
|
"FunctionsRelayError",
|
|
43
|
-
400,
|
|
43
|
+
400 if code is None else code,
|
|
44
44
|
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.9.4" # {x-release-please-version}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.9.3" # {x-release-please-version}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|