-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
53 lines (36 loc) · 1.96 KB
/
errors.go
File metadata and controls
53 lines (36 loc) · 1.96 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
package claudesdk
import "github.com/ethpandaops/claude-agent-sdk-go/internal/errors"
// Public error types.
// CLINotFoundError indicates the Claude CLI binary was not found.
type CLINotFoundError = errors.CLINotFoundError
// CLIConnectionError indicates failure to connect to the CLI.
type CLIConnectionError = errors.CLIConnectionError
// ProcessError indicates the CLI process failed.
type ProcessError = errors.ProcessError
// MessageParseError indicates message parsing failed.
type MessageParseError = errors.MessageParseError
// CLIJSONDecodeError indicates JSON parsing failed for CLI output.
type CLIJSONDecodeError = errors.CLIJSONDecodeError
// ClaudeSDKError is the base interface for all SDK errors.
type ClaudeSDKError = errors.ClaudeSDKError
// Public sentinel errors.
var (
// ErrClientNotConnected indicates the client is not connected.
ErrClientNotConnected = errors.ErrClientNotConnected
// ErrClientAlreadyConnected indicates the client is already connected.
ErrClientAlreadyConnected = errors.ErrClientAlreadyConnected
// ErrClientClosed indicates the client has been closed and cannot be reused.
ErrClientClosed = errors.ErrClientClosed
// ErrTransportNotConnected indicates the transport is not connected.
ErrTransportNotConnected = errors.ErrTransportNotConnected
// ErrRequestTimeout indicates a request timed out.
ErrRequestTimeout = errors.ErrRequestTimeout
// ErrServerInfoUnavailable indicates initialize metadata is not available.
ErrServerInfoUnavailable = errors.ErrServerInfoUnavailable
// ErrSessionNotFound indicates no persisted session was found for the given session ID.
ErrSessionNotFound = errors.ErrSessionNotFound
// ErrSessionCostNotFound indicates no persisted session-cost snapshot was found for the given session ID.
ErrSessionCostNotFound = errors.ErrSessionCostNotFound
// ErrStructuredOutputMissing indicates the result did not include structured output.
ErrStructuredOutputMissing = errors.ErrStructuredOutputMissing
)