-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.py
More file actions
35 lines (19 loc) · 819 Bytes
/
exceptions.py
File metadata and controls
35 lines (19 loc) · 819 Bytes
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
"""Custom exception hierarchy for the CUA agent.
Provides specific exception types so callers can catch and handle
different failure modes distinctly.
"""
from __future__ import annotations
class CUAError(Exception):
"""Base exception for all CUA errors."""
class BrowserError(CUAError):
"""Error during browser interaction (launch, navigation, DOM)."""
class GuardrailError(CUAError):
"""Action blocked by safety guardrails."""
class ConfigError(CUAError):
"""Invalid or missing configuration."""
class SandboxError(CUAError):
"""Error creating or managing the sandbox environment."""
class LLMError(CUAError):
"""Error communicating with the LLM provider (rate limit, timeout, etc.)."""
class RecordingError(CUAError):
"""Error during session recording or trace upload."""