We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
exceptions.py
1 parent d7388c5 commit fe2398bCopy full SHA for fe2398b
1 file changed
replicate/exceptions.py
@@ -33,7 +33,7 @@ class ReplicateError(ReplicateException):
33
instance: Optional[str]
34
"""A URI that identifies the specific occurrence of the error."""
35
36
- def __init__(
+ def __init__( # pylint: disable=too-many-arguments
37
self,
38
type: Optional[str] = None,
39
title: Optional[str] = None,
@@ -50,6 +50,7 @@ def __init__(
50
@classmethod
51
def from_response(cls, response: httpx.Response) -> "ReplicateError":
52
"""Create a ReplicateError from an HTTP response."""
53
+
54
try:
55
data = response.json()
56
except ValueError:
@@ -64,6 +65,8 @@ def from_response(cls, response: httpx.Response) -> "ReplicateError":
64
65
)
66
67
def to_dict(self) -> dict:
68
+ """Get a dictionary representation of the error."""
69
70
return {
71
key: value
72
for key, value in {
0 commit comments