v0.0.208 remove context from err functions because its not used
This commit is contained in:
parent
fb847b03af
commit
493c6ebae8
@ -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())
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
package goext
|
||||
|
||||
const GoextVersion = "0.0.207"
|
||||
const GoextVersion = "0.0.208"
|
||||
|
||||
const GoextVersionTimestamp = "2023-07-25T10:47:00+0200"
|
||||
const GoextVersionTimestamp = "2023-07-25T10:51:14+0200"
|
||||
|
Loading…
Reference in New Issue
Block a user