Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentError ¶
type AgentError struct { Description string Suggestion string Details ErrorDetails }
AgentError is an error that occurs in the agent.
func NewError ¶
func NewError(description string, suggestion string, keyValues ...string) AgentError
NewError will create a new agent error.
func WithDetails ¶
func WithDetails(err error, keyValues ...string) AgentError
WithDetails will add details to an agent error
func Wrap ¶
func Wrap(err error, context string) AgentError
Wrap adds context to the description for richer logs
func (AgentError) MarshalLogObject ¶
func (e AgentError) MarshalLogObject(encoder zapcore.ObjectEncoder) error
MarshalLogObject will define the representation of this error when logging.
func (AgentError) WithDetails ¶
func (e AgentError) WithDetails(keyValues ...string) AgentError
WithDetails will return the error with additional details
type ErrorDetails ¶
ErrorDetails is a map of details for an agent error.
func (ErrorDetails) MarshalLogObject ¶
func (d ErrorDetails) MarshalLogObject(encoder zapcore.ObjectEncoder) error
MarshalLogObject will define the representation of details when logging.
Click to show internal directories.
Click to hide internal directories.