v0.0.208 remove context from err functions because its not used

This commit is contained in:
Julian Graf 2023-07-25 10:51:14 +02:00
parent fb847b03af
commit 493c6ebae8
2 changed files with 11 additions and 5 deletions

View File

@ -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())
}

View File

@ -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"