Fixed exception handling
This commit is contained in:
parent
b2646e5aa1
commit
4afc641ecd
@ -12,13 +12,13 @@ import (
|
||||
|
||||
func NoMethod() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
c.AbortWithError(http.StatusNotFound, nil)
|
||||
c.AbortWithStatus(http.StatusNotFound)
|
||||
}
|
||||
}
|
||||
|
||||
func NoRoute() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
c.AbortWithError(http.StatusNotFound, nil)
|
||||
c.AbortWithStatus(http.StatusNotFound)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user