mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
14 lines
216 B
Go
14 lines
216 B
Go
package api
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
func ErrorHandler(c *gin.Context, err error) {
|
|
log.Println(err)
|
|
c.JSON(http.StatusInternalServerError, gin.H{
|
|
"message": err.Error(),
|
|
})
|
|
}
|