(err error, errorCode ErrorCode, statusCode int)
| 161 | } |
| 162 | |
| 163 | func NewErrorWithStatusCode(err error, errorCode ErrorCode, statusCode int) *NewAPIError { |
| 164 | return &NewAPIError{ |
| 165 | Err: err, |
| 166 | RelayError: nil, |
| 167 | ErrorType: ErrorTypeNewAPIError, |
| 168 | StatusCode: statusCode, |
| 169 | errorCode: errorCode, |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | func WithOpenAIError(openAIError OpenAIError, statusCode int) *NewAPIError { |
| 174 | code, ok := openAIError.Code.(string) |
no outgoing calls
no test coverage detected