diff --git a/xata/api_response.py b/xata/api_response.py index 3f7f6ba..6a90838 100644 --- a/xata/api_response.py +++ b/xata/api_response.py @@ -42,7 +42,9 @@ def __init__(self, response: Response): def server_message(self) -> Union[str, None]: """ - Get the server message from the response + Get the server message from the response, if you need the error message + please the property error_message. This channel is only relevant for + deprecation messages or other meta information from Xata :returns str | None """ return self.headers["x-xata-message"] if "x-xata-message" in self.headers else None @@ -95,7 +97,7 @@ def status_code(self) -> int: return self.response.status_code @property - def error_message(self) -> str | None: + def error_message(self) -> Union[str, None]: """ Get the error message if it is set, otherwise None :returns str | None