You've already forked Go-Template
Please no changes this time.
This commit is contained in:
13
http_handlers/errors/badrequest.go
Normal file
13
http_handlers/errors/badrequest.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package errors
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func NewBadRequestError(c echo.Context, fields map[string]string) error {
|
||||
return c.JSON(http.StatusBadRequest, map[string]interface{}{
|
||||
"error": "Bad Request",
|
||||
"fields": fields,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user