Fix 404 handler to use the proper error format

master
René Jochum 2 years ago
parent 98a0b261b3
commit 80174fd605
Signed by: jochum
GPG Key ID: F7D906F5E51E8E5E

@ -162,7 +162,7 @@ func main() {
r.Use(ginlogrus.Logger(ilogger.Logrus()), gin.Recovery())
r.NoRoute(func(c *gin.Context) {
c.JSON(404, gin.H{"code": http.StatusNotFound, "message": "page not found"})
c.JSON(http.StatusNotFound, gin.H{"errors": []gin.H{{"id": "NOT_FOUND", "message": "page not found"}}})
})
// Register gin with micro

Loading…
Cancel
Save