-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.py
More file actions
55 lines (35 loc) · 1.32 KB
/
Copy pathexceptions.py
File metadata and controls
55 lines (35 loc) · 1.32 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
"""
Custom exceptions for DevRel Research Agent.
"""
class DevRelResearchError(Exception):
"""Base exception for all DevRel research errors."""
pass
class GitHubAPIError(DevRelResearchError):
"""Raised when GitHub API requests fail."""
pass
class RepositoryNotFoundError(DevRelResearchError):
"""Raised when a GitHub repository does not exist or is inaccessible.
Intentionally NOT a subclass of GitHubAPIError so it bypasses retry logic —
a missing repo is permanent, not transient.
"""
pass
class RateLimitError(DevRelResearchError):
"""Raised when API rate limits are exceeded."""
def __init__(self, message: str, retry_after: float = None):
super().__init__(message)
self.retry_after = retry_after # Seconds until rate limit resets
class ElasticsearchError(DevRelResearchError):
"""Raised when Elasticsearch operations fail."""
pass
class SubAgentError(DevRelResearchError):
"""Raised when a subagent fails to complete its task."""
pass
class ConfigurationError(DevRelResearchError):
"""Raised when configuration is invalid or missing."""
pass
class ScoringError(DevRelResearchError):
"""Raised when viability scoring fails."""
pass
class SearchError(DevRelResearchError):
"""Raised when web search operations fail."""
pass