mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-12 03:13:41 +08:00
fix: models api return models in deactivate channels
- Enhance logging functionality by adding context support and improving debugging options. - Standardize function naming conventions across middleware to ensure consistency. - Optimize data retrieval and handling in the model controller, including caching and error management. - Simplify the bug report template to streamline the issue reporting process.
This commit is contained in:
@@ -23,7 +23,8 @@ func abortWithMessage(c *gin.Context, statusCode int, message string) {
|
||||
logger.Error(c.Request.Context(), message)
|
||||
}
|
||||
|
||||
func abortWithError(c *gin.Context, statusCode int, err error) {
|
||||
// AbortWithError aborts the request with an error message
|
||||
func AbortWithError(c *gin.Context, statusCode int, err error) {
|
||||
logger := gmw.GetLogger(c)
|
||||
logger.Error("server abort", zap.Error(err))
|
||||
c.JSON(statusCode, gin.H{
|
||||
|
||||
Reference in New Issue
Block a user