just overload to not get it by mistake again ... (#14440)

tokarchuk/v1.17
6543 4 years ago committed by GitHub
parent 800c436b0b
commit 4acb499f30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      modules/context/api.go

@ -73,6 +73,11 @@ type APIRedirect struct{}
// swagger:response string
type APIString string
// ServerError responds with error message, status is 500
func (ctx *APIContext) ServerError(title string, err error) {
ctx.Error(http.StatusInternalServerError, title, err)
}
// Error responds with an error message to client with given obj as the message.
// If status is 500, also it prints error to log.
func (ctx *APIContext) Error(status int, title string, obj interface{}) {

Loading…
Cancel
Save