Documentation
¶
Overview ¶
Package derr builds gRPC errors carrying a devbox.v1.ErrorDetail, so callers can branch on the reason.
Index ¶
- func Code(err error) codes.Code
- func FileConflict(path string) error
- func InvalidAgentOrModel(msg string) error
- func New(code codes.Code, reason devboxv1.ErrorReason, msg string, md map[string]string) error
- func Reason(err error) devboxv1.ErrorReason
- func ThreadNotFound(id string) error
- func Unsupported(action string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileConflict ¶
FileConflict is the typed FILE_CONFLICT error for a failed compare-and-swap write.
func InvalidAgentOrModel ¶
InvalidAgentOrModel is the typed INVALID_AGENT_OR_MODEL error.
func Reason ¶
func Reason(err error) devboxv1.ErrorReason
Reason extracts the ErrorDetail reason from an error, or UNSPECIFIED.
func ThreadNotFound ¶
ThreadNotFound is the typed THREAD_NOT_FOUND error.
func Unsupported ¶
Unsupported is the typed UNSUPPORTED error for a thread action the agent doesn't advertise.
Types ¶
This section is empty.