mirror of
https://github.com/stulzq/azure-openai-proxy.git
synced 2025-12-18 23:04:19 +01:00
15 lines
206 B
Go
15 lines
206 B
Go
package util
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func SendError(c *gin.Context, err error) {
|
|
c.JSON(500, ApiResponse{
|
|
Error: ErrorDescription{
|
|
Code: "500",
|
|
Message: err.Error(),
|
|
},
|
|
})
|
|
}
|