1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from mcp.server.mcpserver.exceptions import ToolError
from pygittools.tasks import Task
class BoardNotFoundError(ToolError):
def __init__(self, board_name: str):
self.board_name = board_name
super().__init__(f"Board {board_name} not found")
class TaskNotFoundError(ToolError):
def __init__(self, task_ref: str):
self.task_ref = task_ref
super().__init__(f"Task {task_ref} not found")
class InvalidTaskStatusError(ToolError):
def __init__(self, value: str):
self.value = value
self.valid_values = [item.value for item in Task.Status]
super().__init__(
f"Invalid task status value, {value}. Valid task status values: ({','.join(self.valid_values)})"
)
class InvalidTaskPriorityError(ToolError):
def __init__(self, value: str):
self.value = value
self.valid_values = [item.value for item in Task.Priority]
super().__init__(
f"Invalid task priority value, {value}. Valid task priority values: ({','.join(self.valid_values)})"
)
class InvalidTaskDueDateError(ToolError):
def __init__(self, dt: str):
super().__init__(f"Invalid due date string, {dt}. Due dates must me an iso8601 timestamp")