-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy patherrors.ts
More file actions
34 lines (30 loc) · 883 Bytes
/
errors.ts
File metadata and controls
34 lines (30 loc) · 883 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
/**
* Error Types for Agent Relay
*
* Re-exports error classes from @agent-relay/utils, which is the single
* source of truth. This module exists so SDK consumers can import errors
* from either '@agent-relay/sdk' or '@agent-relay/sdk/errors'.
*/
export {
RelayError,
DaemonNotRunningError,
AgentNotFoundError,
TimeoutError,
ConnectionError,
ChannelNotFoundError,
SpawnError,
} from '@agent-relay/utils/errors';
// RelayServerError is defined locally for SDK-specific error handling
import { RelayError } from '@agent-relay/utils/errors';
export class RelayServerError extends RelayError {
code: string;
fatal: boolean;
envelope?: any;
constructor(message: string, code: string, fatal: boolean, envelope?: any) {
super(message);
this.name = 'RelayServerError';
this.code = code;
this.fatal = fatal;
this.envelope = envelope;
}
}