diff --git a/botcity/maestro/impl/v1.py b/botcity/maestro/impl/v1.py index 0ed4fa0..208092f 100644 --- a/botcity/maestro/impl/v1.py +++ b/botcity/maestro/impl/v1.py @@ -432,16 +432,20 @@ def get_artifact(self, artifact_id: int) -> Tuple[str, bytes]: raise ValueError(message) def error(self, task_id: int, exception: Exception, screenshot=None, attachments=None, tags=None): - """ - Creates a new artifact + """Create a new Error entry. Args: - task_id: The task unique identifier. - name: The name of the artifact to be displayed on the portal. - filename: The file to be uploaded. - - Returns: - Server response message. See [ServerMessage][botcity.maestro.model.ServerMessage] + task_id (int): The task unique identifier. + exception (Exception): The exception object. + screenshot (Optional[str], optional): File path for a screenshot to be attached + to the error. Defaults to None. + attachments (Optional[List[str]], optional): Additional files to be sent along + with the error entry. Defaults to None. + tags (Optional[Dict[str, str]], optional): Dictionary with tags to be associated + with the error entry. Defaults to None. + + Raises: + ValueError: If the request fails, a ValueError exception is raised. """ raise NotImplementedError diff --git a/botcity/maestro/sdk.py b/botcity/maestro/sdk.py index 3e93bb1..f78a743 100644 --- a/botcity/maestro/sdk.py +++ b/botcity/maestro/sdk.py @@ -292,17 +292,22 @@ def get_artifact(self, artifact_id: int) -> Tuple[str, bytes]: @ensure_implementation() @since_version("2.0.0") @ensure_access_token() - def error(self, task_id: int, exception: Exception, screenshot=None, attachments=None, tags=None): - """ - Creates a new artifact + def error(self, task_id: int, exception: Exception, screenshot: Optional[str] = None, + attachments: Optional[List[str]] = None, tags: Optional[Dict[str, str]] = None): + """Create a new Error entry. Args: - task_id: The task unique identifier. - name: The name of the artifact to be displayed on the portal. - filename: The file to be uploaded. - - Returns: - Server response message. See [ServerMessage][botcity.maestro.model.ServerMessage] + task_id (int): The task unique identifier. + exception (Exception): The exception object. + screenshot (Optional[str], optional): File path for a screenshot to be attached + to the error. Defaults to None. + attachments (Optional[List[str]], optional): Additional files to be sent along + with the error entry. Defaults to None. + tags (Optional[Dict[str, str]], optional): Dictionary with tags to be associated + with the error entry. Defaults to None. + + Raises: + ValueError: If the request fails, a ValueError exception is raised. """ return self._impl.error(task_id, exception, screenshot, attachments, tags)