MCPcopy Index your code
hub / github.com/aiprodcoder/MIXAPI / ToClaudeError

Method ToClaudeError

types/error.go:127–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125}
126
127func (e *NewAPIError) ToClaudeError() ClaudeError {
128 switch e.ErrorType {
129 case ErrorTypeOpenAIError:
130 openAIError := e.RelayError.(OpenAIError)
131 return ClaudeError{
132 Message: e.Error(),
133 Type: fmt.Sprintf("%v", openAIError.Code),
134 }
135 case ErrorTypeClaudeError:
136 return e.RelayError.(ClaudeError)
137 default:
138 return ClaudeError{
139 Message: e.Error(),
140 Type: string(e.ErrorType),
141 }
142 }
143}
144
145func NewError(err error, errorCode ErrorCode) *NewAPIError {
146 return &NewAPIError{

Callers 1

RelayClaudeFunction · 0.95

Calls 1

ErrorMethod · 0.95

Tested by

no test coverage detected