(err error, code string)
| 118 | } |
| 119 | |
| 120 | func WrapperOpenAIError(err error, code string) *OpenAIError { |
| 121 | return &OpenAIError{ |
| 122 | Error: Error{ |
| 123 | Message: err.Error(), |
| 124 | Code: code, |
| 125 | }, |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | func ReturnOpenAIError(c *gin.Context, err error, code string, statusCode int) { |
| 130 | c.JSON(statusCode, OpenAIError{ |
nothing calls this directly
no outgoing calls
no test coverage detected