File size: 598 Bytes
3b06b67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
class AppError(Exception):
	status_code: int = 500

	def __init__(self, detail: str, status_code: int | None = None) -> None:
		super().__init__(detail)
		self.detail = detail
		if status_code is not None:
			self.status_code = status_code


class RetrievalError(AppError):
	status_code = 503


class IngestionError(AppError):
	status_code = 503


class GraphError(AppError):
	status_code = 500


class GraphNodeNotFoundError(GraphError):
	status_code = 404


class LLMServiceError(AppError):
	status_code = 503


class ValidationError(AppError):
	status_code = 400