recallrai 0.2.0__py3-none-any.whl → 0.3.0__py3-none-any.whl

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.

Potentially problematic release.


This version of recallrai might be problematic. Click here for more details.

recallrai/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  """
2
- RecallrAI Python SDK
2
+ RecallrAI Python SDK.
3
3
 
4
4
  This package provides a Python interface to interact with the RecallrAI API.
5
5
  """
@@ -8,7 +8,7 @@ from .client import RecallrAI
8
8
  from .user import User
9
9
  from .session import Session
10
10
 
11
- __version__ = "0.2.0"
11
+ __version__ = "0.3.0"
12
12
 
13
13
  __all__ = [
14
14
  "RecallrAI",
recallrai/client.py CHANGED
@@ -4,6 +4,7 @@ Main client class for the RecallrAI SDK.
4
4
  This module provides the RecallrAI class, which is the primary interface for the SDK.
5
5
  """
6
6
 
7
+ import json
7
8
  from typing import Any, Dict, Optional
8
9
  from .models import UserModel, UserList
9
10
  from .user import User
@@ -35,98 +36,112 @@ class RecallrAI:
35
36
  Initialize the RecallrAI client.
36
37
 
37
38
  Args:
38
- api_key: Your RecallrAI API key
39
- project_id: Your project ID
40
- base_url: The base URL for the RecallrAI API
41
- timeout: Request timeout in seconds
39
+ api_key: Your RecallrAI API key.
40
+ project_id: Your project ID.
41
+ base_url: The base URL for the RecallrAI API.
42
+ timeout: Request timeout in seconds.
42
43
  """
43
44
  if not api_key.startswith("rai_"):
44
45
  raise ValueError("API key must start with 'rai_'")
45
46
 
46
- self.api_key = api_key
47
- self.project_id = project_id
48
- self.base_url = base_url
49
-
50
- self.http = HTTPClient(
51
- api_key=self.api_key,
52
- project_id=self.project_id,
53
- base_url=self.base_url,
47
+ self._http = HTTPClient(
48
+ api_key=api_key,
49
+ project_id=project_id,
50
+ base_url=base_url,
54
51
  timeout=timeout,
55
52
  )
56
53
 
57
54
  # User management
58
- def create_user(self, user_id: str, metadata: Optional[Dict[str, Any]] = None) -> User:
55
+ def create_user(
56
+ self,
57
+ user_id: str,
58
+ metadata: Optional[Dict[str, Any]] = None,
59
+ ) -> User:
59
60
  """
60
61
  Create a new user.
61
62
 
62
63
  Args:
63
- user_id: Unique identifier for the user
64
- metadata: Optional metadata to associate with the user
64
+ user_id: Unique identifier for the user.
65
+ metadata: Optional metadata to associate with the user.
65
66
 
66
67
  Returns:
67
- The created user object
68
+ The created user object.
68
69
 
69
70
  Raises:
70
- UserAlreadyExistsError: If a user with the same ID already exists
71
- AuthenticationError: If the API key or project ID is invalid
72
- InternalServerError: If the server encounters an error
73
- NetworkError: If there are network issues
74
- TimeoutError: If the request times out
75
- RecallrAIError: For other API-related errors
71
+ UserAlreadyExistsError: If a user with the same ID already exists.
72
+ AuthenticationError: If the API key or project ID is invalid.
73
+ InternalServerError: If the server encounters an error.
74
+ NetworkError: If there are network issues.
75
+ TimeoutError: If the request times out.
76
+ RecallrAIError: For other API-related errors.
76
77
  """
77
- response = self.http.post("/api/v1/users", data={"user_id": user_id, "metadata": metadata or {}})
78
+ response = self._http.post("/api/v1/users", data={"user_id": user_id, "metadata": metadata or {}})
78
79
  if response.status_code == 409:
79
- raise UserAlreadyExistsError(user_id=user_id)
80
+ detail = response.json().get("detail", f"User with ID {user_id} already exists")
81
+ raise UserAlreadyExistsError(message=detail, http_status=response.status_code)
80
82
  elif response.status_code != 201:
81
- raise RecallrAIError("Failed to create user", http_status=response.status_code)
83
+ detail = response.json().get("detail", "Failed to create user")
84
+ raise RecallrAIError(message=detail, http_status=response.status_code)
82
85
  user_data = UserModel.from_api_response(response.json())
83
- return User(self.http, user_data)
86
+ return User(self._http, user_data)
84
87
 
85
88
  def get_user(self, user_id: str) -> User:
86
89
  """
87
90
  Get a user by ID.
88
91
 
89
92
  Args:
90
- user_id: Unique identifier of the user
93
+ user_id: Unique identifier of the user.
91
94
 
92
95
  Returns:
93
- A User object representing the user
96
+ A User object representing the user.
94
97
 
95
98
  Raises:
96
- UserNotFoundError: If the user is not found
97
- AuthenticationError: If the API key or project ID is invalid
98
- InternalServerError: If the server encounters an error
99
- NetworkError: If there are network issues
100
- TimeoutError: If the request times out
101
- RecallrAIError: For other API-related errors
99
+ UserNotFoundError: If the user is not found.
100
+ AuthenticationError: If the API key or project ID is invalid.
101
+ InternalServerError: If the server encounters an error.
102
+ NetworkError: If there are network issues.
103
+ TimeoutError: If the request times out.
104
+ RecallrAIError: For other API-related errors.
102
105
  """
103
- response = self.http.get(f"/api/v1/users/{user_id}")
106
+ response = self._http.get(f"/api/v1/users/{user_id}")
104
107
  if response.status_code == 404:
105
- raise UserNotFoundError(user_id=user_id)
108
+ detail = response.json().get("detail", f"User with ID {user_id} not found")
109
+ raise UserNotFoundError(message=detail, http_status=response.status_code)
106
110
  elif response.status_code != 200:
107
- raise RecallrAIError("Failed to retrieve user", http_status=response.status_code)
111
+ detail = response.json().get("detail", "Failed to retrieve user")
112
+ raise RecallrAIError(message=detail, http_status=response.status_code)
108
113
  user_data = UserModel.from_api_response(response.json())
109
- return User(self.http, user_data)
110
-
111
- def list_users(self, offset: int = 0, limit: int = 10) -> UserList:
114
+ return User(self._http, user_data)
115
+
116
+ def list_users(
117
+ self,
118
+ offset: int = 0,
119
+ limit: int = 10,
120
+ metadata_filter: Optional[Dict[str, Any]] = None
121
+ ) -> UserList:
112
122
  """
113
123
  List users with pagination.
114
124
 
115
125
  Args:
116
- offset: Number of records to skip
117
- limit: Maximum number of records to return
126
+ offset: Number of records to skip.
127
+ limit: Maximum number of records to return.
118
128
 
119
129
  Returns:
120
- List of users with pagination info
130
+ List of users with pagination info.
121
131
 
122
132
  Raises:
123
- AuthenticationError: If the API key or project ID is invalid
124
- InternalServerError: If the server encounters an error
125
- NetworkError: If there are network issues
126
- TimeoutError: If the request times out
127
- RecallrAIError: For other API-related errors
133
+ AuthenticationError: If the API key or project ID is invalid.
134
+ InternalServerError: If the server encounters an error.
135
+ NetworkError: If there are network issues.
136
+ TimeoutError: If the request times out.
137
+ RecallrAIError: For other API-related errors.
128
138
  """
129
- response = self.http.get("/api/v1/users", params={"offset": offset, "limit": limit})
139
+ params: Dict[str, Any] = {"offset": offset, "limit": limit}
140
+ if metadata_filter is not None:
141
+ params["metadata_filter"] = json.dumps(metadata_filter)
142
+
143
+ response = self._http.get("/api/v1/users", params=params)
130
144
  if response.status_code != 200:
131
- raise RecallrAIError("Failed to list users", http_status=response.status_code)
132
- return UserList.from_api_response(response.json())
145
+ detail = response.json().get("detail", "Failed to list users")
146
+ raise RecallrAIError(message=detail, http_status=response.status_code)
147
+ return UserList.from_api_response(response.json(), self._http)
@@ -2,27 +2,39 @@
2
2
  Exceptions for the RecallrAI SDK.
3
3
  """
4
4
 
5
- from .auth import AuthenticationError
6
5
  from .base import RecallrAIError
7
- from .network import NetworkError, TimeoutError, ConnectionError
8
- from .server import ServerError, InternalServerError
9
- from .sessions import SessionError, SessionNotFoundError, InvalidSessionStateError
10
- from .users import UserError, UserNotFoundError, UserAlreadyExistsError
6
+ from .auth import AuthenticationError
7
+ from .network import TimeoutError, ConnectionError
8
+ from .server import InternalServerError, RateLimitError
9
+ from .sessions import SessionNotFoundError, InvalidSessionStateError
10
+ from .users import UserNotFoundError, UserAlreadyExistsError, InvalidCategoriesError
11
11
  from .validation import ValidationError
12
+ from .merge_conflicts import (
13
+ MergeConflictError,
14
+ MergeConflictNotFoundError,
15
+ MergeConflictAlreadyResolvedError,
16
+ MergeConflictInvalidQuestionsError,
17
+ MergeConflictMissingAnswersError,
18
+ MergeConflictInvalidAnswerError,
19
+ )
12
20
 
13
21
  __all__ = [
14
22
  "RecallrAIError",
15
23
  "AuthenticationError",
16
- "NetworkError",
17
24
  "TimeoutError",
18
25
  "ConnectionError",
19
- "ServerError",
20
26
  "InternalServerError",
21
- "SessionError",
27
+ "RateLimitError",
22
28
  "SessionNotFoundError",
23
29
  "InvalidSessionStateError",
24
- "UserError",
25
30
  "UserNotFoundError",
26
31
  "UserAlreadyExistsError",
32
+ "InvalidCategoriesError",
27
33
  "ValidationError",
34
+ "MergeConflictError",
35
+ "MergeConflictNotFoundError",
36
+ "MergeConflictAlreadyResolvedError",
37
+ "MergeConflictInvalidQuestionsError",
38
+ "MergeConflictMissingAnswersError",
39
+ "MergeConflictInvalidAnswerError",
28
40
  ]
@@ -2,7 +2,6 @@
2
2
  Authentication-related exceptions for the RecallrAI SDK.
3
3
  """
4
4
 
5
- from typing import Any, Dict, Optional
6
5
  from .base import RecallrAIError
7
6
 
8
7
 
@@ -16,9 +15,7 @@ class AuthenticationError(RecallrAIError):
16
15
 
17
16
  def __init__(
18
17
  self,
19
- message: str = "Invalid API key or authentication failed",
20
- code: str = "authentication_error",
18
+ message: str = "Invalid API key or authentication failed.",
21
19
  http_status: int = 401,
22
- details: Optional[Dict[str, Any]] = None
23
20
  ):
24
- super().__init__(message, code, http_status, details)
21
+ super().__init__(message, http_status)
@@ -2,32 +2,23 @@
2
2
  Base exception classes for the RecallrAI SDK.
3
3
  """
4
4
 
5
- from typing import Any, Dict, Optional
6
-
7
-
8
5
  class RecallrAIError(Exception):
9
- """Base exception for all RecallrAI SDK errors."""
6
+ """Base exception class for all RecallrAI SDK exceptions."""
10
7
 
11
8
  def __init__(
12
9
  self,
13
10
  message: str,
14
- code: Optional[str] = None,
15
- http_status: Optional[int] = None,
16
- details: Optional[Dict[str, Any]] = None
11
+ http_status: int,
17
12
  ):
18
13
  """
19
14
  Initialize a RecallrAI error.
20
15
 
21
16
  Args:
22
- message: A human-readable error message
23
- code: An optional error code
24
- http_status: The HTTP status code that triggered this error
25
- details: Optional additional details about the error
17
+ message: A human-readable error message.
18
+ http_status: The HTTP status code that triggered this error.
26
19
  """
27
20
  self.message = message
28
- self.code = code
29
21
  self.http_status = http_status
30
- self.details = details or {}
31
22
  super().__init__(self.message)
32
23
 
33
24
  def __str__(self) -> str:
@@ -0,0 +1,69 @@
1
+ """
2
+ Merge conflicts-related exceptions for the RecallrAI SDK.
3
+ """
4
+
5
+ from .base import RecallrAIError
6
+
7
+ class MergeConflictError(RecallrAIError):
8
+ """
9
+ Base class for merge conflict-related exceptions.
10
+
11
+ This exception is raised for errors related to merge conflict management
12
+ in the RecallrAI API.
13
+ """
14
+
15
+ def __init__(self, message: str, http_status: int):
16
+ super().__init__(message, http_status)
17
+
18
+ class MergeConflictNotFoundError(MergeConflictError):
19
+ """
20
+ Raised when a merge conflict is not found.
21
+
22
+ This exception is typically raised when trying to access or modify
23
+ a merge conflict that doesn't exist.
24
+ """
25
+ def __init__(self, message: str, http_status: int):
26
+ super().__init__(message, http_status)
27
+
28
+ class MergeConflictAlreadyResolvedError(MergeConflictError):
29
+ """
30
+ Raised when trying to resolve a merge conflict that is already resolved.
31
+
32
+ This exception is typically raised when trying to resolve a merge conflict
33
+ that has already been processed.
34
+ """
35
+ def __init__(self, message: str, http_status: int):
36
+ super().__init__(message, http_status)
37
+
38
+
39
+ class MergeConflictInvalidQuestionsError(MergeConflictError):
40
+ """
41
+ Raised when trying to resolve a merge conflict with invalid questions.
42
+
43
+ This exception is raised when the provided questions don't match the
44
+ original clarifying questions for the merge conflict.
45
+ """
46
+ def __init__(self, message: str, http_status: int):
47
+ super().__init__(message, http_status)
48
+
49
+
50
+ class MergeConflictMissingAnswersError(MergeConflictError):
51
+ """
52
+ Raised when trying to resolve a merge conflict with missing answers.
53
+
54
+ This exception is raised when not all required clarifying questions
55
+ have been answered.
56
+ """
57
+ def __init__(self, message: str, http_status: int):
58
+ super().__init__(message, http_status)
59
+
60
+
61
+ class MergeConflictInvalidAnswerError(MergeConflictError):
62
+ """
63
+ Raised when trying to resolve a merge conflict with invalid answer options.
64
+
65
+ This exception is raised when the provided answer is not one of the
66
+ valid options for a question.
67
+ """
68
+ def __init__(self, message: str, http_status: int):
69
+ super().__init__(message, http_status)
@@ -2,7 +2,6 @@
2
2
  Network-related exceptions for the RecallrAI SDK.
3
3
  """
4
4
 
5
- from typing import Any, Dict, Optional
6
5
  from .base import RecallrAIError
7
6
 
8
7
 
@@ -14,14 +13,8 @@ class NetworkError(RecallrAIError):
14
13
  and communication with the RecallrAI API.
15
14
  """
16
15
 
17
- def __init__(
18
- self,
19
- message: str = "Network error occurred",
20
- code: str = "network_error",
21
- http_status: Optional[int] = None,
22
- details: Optional[Dict[str, Any]] = None
23
- ):
24
- super().__init__(message, code, http_status, details)
16
+ def __init__(self, message: str, http_status: int):
17
+ super().__init__(message, http_status)
25
18
 
26
19
 
27
20
  class TimeoutError(NetworkError):
@@ -32,13 +25,8 @@ class TimeoutError(NetworkError):
32
25
  takes longer than the configured timeout.
33
26
  """
34
27
 
35
- def __init__(
36
- self,
37
- message: str = "Request timed out",
38
- code: str = "timeout",
39
- details: Optional[Dict[str, Any]] = None
40
- ):
41
- super().__init__(message, code, None, details)
28
+ def __init__(self, message: str, http_status: int):
29
+ super().__init__(message, http_status)
42
30
 
43
31
 
44
32
  class ConnectionError(NetworkError):
@@ -49,10 +37,5 @@ class ConnectionError(NetworkError):
49
37
  the RecallrAI API, such as DNS resolution issues or network unavailability.
50
38
  """
51
39
 
52
- def __init__(
53
- self,
54
- message: str = "Failed to connect to the RecallrAI API",
55
- code: str = "connection_error",
56
- details: Optional[Dict[str, Any]] = None
57
- ):
58
- super().__init__(message, code, None, details)
40
+ def __init__(self, message: str, http_status: int):
41
+ super().__init__(message, http_status)
@@ -2,22 +2,18 @@
2
2
  Server-related exceptions for the RecallrAI SDK.
3
3
  """
4
4
 
5
- from typing import Any, Dict, Optional
6
5
  from .base import RecallrAIError
7
6
 
8
7
 
9
8
  class ServerError(RecallrAIError):
10
9
  """
11
10
  Base class for server-related exceptions.
11
+
12
+ This exception serves as the base for all exceptions related to
13
+ server-side errors in the RecallrAI API.
12
14
  """
13
- def __init__(
14
- self,
15
- message: str = "Server error occurred",
16
- code: str = "server_error",
17
- http_status: int = 500,
18
- details: Optional[Dict[str, Any]] = None
19
- ):
20
- super().__init__(message, code, http_status, details)
15
+ def __init__(self, message: str, http_status: int):
16
+ super().__init__(message, http_status)
21
17
 
22
18
  class InternalServerError(ServerError):
23
19
  """
@@ -26,38 +22,19 @@ class InternalServerError(ServerError):
26
22
  This exception is typically raised when the API returns a 5xx error code.
27
23
  """
28
24
 
29
- def __init__(
30
- self,
31
- message: str = "Internal server error",
32
- code: str = "server_error",
33
- http_status: int = 500,
34
- details: Optional[Dict[str, Any]] = None
35
- ):
36
- super().__init__(message, code, http_status, details)
37
-
25
+ def __init__(self, message: str, http_status: int):
26
+ super().__init__(message, http_status)
38
27
 
39
- # class RateLimitError(ServerError):
40
- # """
41
- # Raised when the API rate limit has been exceeded.
42
- #
43
- # This exception is raised when too many requests are made in a
44
- # short period of time.
45
- # """
28
+ class RateLimitError(ServerError):
29
+ """
30
+ Raised when the API rate limit has been exceeded.
46
31
 
47
- # def __init__(
48
- # self,
49
- # message: str = "API rate limit exceeded",
50
- # code: str = "rate_limit_exceeded",
51
- # http_status: int = 429,
52
- # retry_after: Optional[int] = None,
53
- # details: Optional[Dict[str, Any]] = None
54
- # ):
55
- # details = details or {}
56
- # if retry_after:
57
- # details["retry_after"] = retry_after
58
- # super().__init__(message, code, http_status, details)
59
- # self.retry_after = retry_after
32
+ This exception is raised when too many requests are made in a
33
+ short period of time.
34
+ """
60
35
 
36
+ def __init__(self, message: str, http_status: int):
37
+ super().__init__(message, http_status)
61
38
 
62
39
  # class ServiceUnavailableError(ServerError):
63
40
  # """
@@ -66,10 +43,10 @@ class InternalServerError(ServerError):
66
43
  # This exception is raised when the API is down for maintenance
67
44
  # or experiencing issues.
68
45
  # """
69
-
46
+ #
70
47
  # def __init__(
71
48
  # self,
72
- # message: str = "Service temporarily unavailable",
49
+ # message: str = "Service temporarily unavailable.",
73
50
  # code: str = "service_unavailable",
74
51
  # http_status: int = 503,
75
52
  # retry_after: Optional[int] = None,
@@ -2,7 +2,6 @@
2
2
  Sessions-related exceptions for the RecallrAI SDK.
3
3
  """
4
4
 
5
- from typing import Any, Dict, Optional
6
5
  from .base import RecallrAIError
7
6
 
8
7
  class SessionError(RecallrAIError):
@@ -13,14 +12,8 @@ class SessionError(RecallrAIError):
13
12
  in the RecallrAI API.
14
13
  """
15
14
 
16
- def __init__(
17
- self,
18
- message: str = "Session error occurred",
19
- code: str = "session_error",
20
- http_status: Optional[int] = None,
21
- details: Optional[Dict[str, Any]] = None
22
- ):
23
- super().__init__(message, code, http_status, details)
15
+ def __init__(self, message: str, http_status: int):
16
+ super().__init__(message, http_status)
24
17
 
25
18
  class InvalidSessionStateError(SessionError):
26
19
  """
@@ -30,14 +23,8 @@ class InvalidSessionStateError(SessionError):
30
23
  on a session that is not in the expected state.
31
24
  """
32
25
 
33
- def __init__(
34
- self,
35
- message: str = "Invalid session state",
36
- code: str = "invalid_session_state",
37
- http_status: int = 400,
38
- details: Optional[Dict[str, Any]] = None
39
- ):
40
- super().__init__(message, code, http_status, details)
26
+ def __init__(self, message: str, http_status: int):
27
+ super().__init__(message, http_status)
41
28
 
42
29
  class SessionNotFoundError(SessionError):
43
30
  """
@@ -47,14 +34,5 @@ class SessionNotFoundError(SessionError):
47
34
  a session that doesn't exist.
48
35
  """
49
36
 
50
- def __init__(
51
- self,
52
- session_id: Optional[str] = None,
53
- message: Optional[str] = None,
54
- code: str = "session_not_found",
55
- http_status: int = 404,
56
- details: Optional[Dict[str, Any]] = None
57
- ):
58
- message = message or f"Session{f' {session_id}' if session_id else ''} not found"
59
- super().__init__(message, code, http_status, details)
60
- self.session_id = session_id
37
+ def __init__(self, message: str, http_status: int):
38
+ super().__init__(message, http_status)
@@ -2,7 +2,6 @@
2
2
  Users-related exceptions for the RecallrAI SDK.
3
3
  """
4
4
 
5
- from typing import Any, Dict, Optional
6
5
  from .base import RecallrAIError
7
6
 
8
7
  class UserError(RecallrAIError):
@@ -13,14 +12,8 @@ class UserError(RecallrAIError):
13
12
  in the RecallrAI API.
14
13
  """
15
14
 
16
- def __init__(
17
- self,
18
- message: str = "User error occurred",
19
- code: str = "user_error",
20
- http_status: Optional[int] = None,
21
- details: Optional[Dict[str, Any]] = None
22
- ):
23
- super().__init__(message, code, http_status, details)
15
+ def __init__(self, message: str, http_status: int):
16
+ super().__init__(message, http_status)
24
17
 
25
18
  class UserNotFoundError(UserError):
26
19
  """
@@ -29,17 +22,8 @@ class UserNotFoundError(UserError):
29
22
  This exception is typically raised when trying to access or modify
30
23
  a user that doesn't exist.
31
24
  """
32
- def __init__(
33
- self,
34
- user_id: Optional[str] = None,
35
- message: Optional[str] = None,
36
- code: str = "user_not_found",
37
- http_status: int = 404,
38
- details: Optional[Dict[str, Any]] = None
39
- ):
40
- message = message or f"User{f' {user_id}' if user_id else ''} not found"
41
- super().__init__(message, code, http_status, details)
42
- self.user_id = user_id
25
+ def __init__(self, message: str, http_status: int):
26
+ super().__init__(message, http_status)
43
27
 
44
28
  class UserAlreadyExistsError(UserError):
45
29
  """
@@ -48,14 +32,15 @@ class UserAlreadyExistsError(UserError):
48
32
  This exception is typically raised when trying to create a user
49
33
  that already exists in the system.
50
34
  """
51
- def __init__(
52
- self,
53
- user_id: Optional[str] = None,
54
- message: Optional[str] = None,
55
- code: str = "user_already_exists",
56
- http_status: int = 409,
57
- details: Optional[Dict[str, Any]] = None
58
- ):
59
- message = message or f"User{f' {user_id}' if user_id else ''} already exists"
60
- super().__init__(message, code, http_status, details)
61
- self.user_id = user_id
35
+ def __init__(self, message: str, http_status: int):
36
+ super().__init__(message, http_status)
37
+
38
+ class InvalidCategoriesError(UserError):
39
+ """
40
+ Raised when invalid categories are provided for user memories.
41
+
42
+ This exception is typically raised when trying to filter memories
43
+ by categories that don't exist in the project.
44
+ """
45
+ def __init__(self, message: str, http_status: int):
46
+ super().__init__(message, http_status)
@@ -2,7 +2,6 @@
2
2
  Validation-related exceptions for the RecallrAI SDK.
3
3
  """
4
4
 
5
- from typing import Any, Dict, Optional, Union
6
5
  from .base import RecallrAIError
7
6
 
8
7
 
@@ -14,11 +13,5 @@ class ValidationError(RecallrAIError):
14
13
  due to invalid or missing parameters.
15
14
  """
16
15
 
17
- def __init__(
18
- self,
19
- message: str = "Validation error",
20
- code: str = "validation_error",
21
- http_status: int = 422,
22
- details: Optional[Dict[str, Any]] = None
23
- ):
24
- super().__init__(message, code, http_status, details)
16
+ def __init__(self, message: str, http_status: int):
17
+ super().__init__(message, http_status)