Please no changes this time.

This commit is contained in:
2025-05-22 16:56:58 -04:00
commit 71ff41d387
11 changed files with 333 additions and 0 deletions

View 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,
})
}

View File

@@ -0,0 +1,10 @@
package errors
import (
"github.com/labstack/echo/v4"
"net/http"
)
func NewNotFoundError(c echo.Context) error {
return c.JSON(http.StatusNotFound, map[string]string{"error": "Not Found"})
}