Skip to content

Commit 8dc76bd

Browse files
committed
just overload to not get it by mistake again ...
1 parent 800c436 commit 8dc76bd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/context/api.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ type APIRedirect struct{}
7373
// swagger:response string
7474
type APIString string
7575

76+
// ServerError responds with error message, status is 500
77+
func (ctx *APIContext) ServerError(title string, err error) {
78+
ctx.Error(http.StatusInternalServerError, title, err)
79+
}
80+
7681
// Error responds with an error message to client with given obj as the message.
7782
// If status is 500, also it prints error to log.
7883
func (ctx *APIContext) Error(status int, title string, obj interface{}) {

0 commit comments

Comments
 (0)