mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-05-02 03:00:36 -04:00
update agentError constructor
This commit is contained in:
@@ -39,8 +39,8 @@ func (e *AgentError) Category() ErrorCategory { return CategoryAgent }
|
||||
|
||||
func (e *AgentError) Unwrap() error { return e.Cause }
|
||||
|
||||
func NewAgentError(msg string, args ...any) *AgentError {
|
||||
return &AgentError{Msg: fmt.Sprintf(msg, args...)}
|
||||
func NewAgentError(msg string, cause error) *AgentError {
|
||||
return &AgentError{Msg: msg, Cause: cause}
|
||||
}
|
||||
|
||||
// ClientServerError returns 4XX/5XX error code
|
||||
|
||||
Reference in New Issue
Block a user