cic-custodial/internal/api/errors.go
Mohammed Sohail add7f2a442
refactor: ctx propagation, api handlers
* use context timeout middleware for correct ctx propagation
* Fix bind error handling
* Fix validation error handling
* Fix HTTP error handling (4XX)
* tasker client now  accepts ctx
* add recovery and body size middleware
2023-02-24 16:46:46 +00:00

12 lines
198 B
Go

package api
import (
"net/http"
"github.com/labstack/echo/v4"
)
func NewBadRequestError(message ...interface{}) *echo.HTTPError {
return echo.NewHTTPError(http.StatusBadRequest, message...)
}