-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
26 lines (18 loc) · 1.15 KB
/
errors.go
File metadata and controls
26 lines (18 loc) · 1.15 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
package copilotcli
import "errors"
var (
// ErrNotConnected is returned when an operation requires an active connection to the sidecar.
ErrNotConnected = errors.New("copilot client is not connected to the sidecar")
// ErrAlreadyConnected is returned when Start is called on an already-connected client.
ErrAlreadyConnected = errors.New("copilot client is already connected")
// ErrEmptyPrompt is returned when an empty prompt is passed to Query.
ErrEmptyPrompt = errors.New("prompt must not be empty")
// ErrSidecarUnavailable is returned when the sidecar cannot be reached after retries.
ErrSidecarUnavailable = errors.New("copilot CLI sidecar is unavailable after retries")
// ErrMissingModel is returned when BYOK auth mode is used without specifying a model.
ErrMissingModel = errors.New("model is required when using BYOK auth mode")
// ErrMissingProviderBaseURL is returned when BYOK is used without a base URL.
ErrMissingProviderBaseURL = errors.New("provider base URL is required when using BYOK auth mode")
// ErrMissingCLIURL is returned when the CLI URL is empty after applying options.
ErrMissingCLIURL = errors.New("CLI URL must not be empty")
)