v0.0.207 renamed APIError to Error

This commit is contained in:
2023-07-25 10:47:00 +02:00
parent f826633e6e
commit fb847b03af
4 changed files with 12 additions and 12 deletions

View File

@@ -170,12 +170,12 @@ func Redirect(sc int, newURL string) HTTPResponse {
return &redirectHTTPResponse{statusCode: sc, url: newURL}
}
func APIError(g *gin.Context, e error) HTTPResponse {
func Error(g *gin.Context, e error) HTTPResponse {
return &jsonAPIErrResponse{
err: exerr.FromError(e),
}
}
func NotImplemented(g *gin.Context) HTTPResponse {
return APIError(g, exerr.New(exerr.TypeNotImplemented, "").Build())
return Error(g, exerr.New(exerr.TypeNotImplemented, "").Build())
}