v0.0.208 remove context from err functions because its not used
This commit is contained in:
@@ -170,12 +170,18 @@ func Redirect(sc int, newURL string) HTTPResponse {
|
||||
return &redirectHTTPResponse{statusCode: sc, url: newURL}
|
||||
}
|
||||
|
||||
func Error(g *gin.Context, e error) HTTPResponse {
|
||||
func Error(e error) HTTPResponse {
|
||||
return &jsonAPIErrResponse{
|
||||
err: exerr.FromError(e),
|
||||
}
|
||||
}
|
||||
|
||||
func NotImplemented(g *gin.Context) HTTPResponse {
|
||||
return Error(g, exerr.New(exerr.TypeNotImplemented, "").Build())
|
||||
func ErrWrap(e error, errorType exerr.ErrorType, msg string) HTTPResponse {
|
||||
return &jsonAPIErrResponse{
|
||||
err: exerr.FromError(exerr.Wrap(e, msg).WithType(errorType).Build()),
|
||||
}
|
||||
}
|
||||
|
||||
func NotImplemented() HTTPResponse {
|
||||
return Error(exerr.New(exerr.TypeNotImplemented, "").Build())
|
||||
}
|
||||
|
Reference in New Issue
Block a user