MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / ErrorResp

Function ErrorResp

server/common/common.go:27–42  ·  view source on GitHub ↗

ErrorResp is used to return error response @param l: if true, log error

(c *gin.Context, err error, code int, l ...bool)

Source from the content-addressed store, hash-verified

25// ErrorResp is used to return error response
26// @param l: if true, log error
27func ErrorResp(c *gin.Context, err error, code int, l ...bool) {
28 ErrorWithDataResp(c, err, code, nil, l...)
29 //if len(l) > 0 && l[0] {
30 // if flags.Debug || flags.Dev {
31 // log.Errorf("%+v", err)
32 // } else {
33 // log.Errorf("%v", err)
34 // }
35 //}
36 //c.JSON(200, Resp[interface{}]{
37 // Code: code,
38 // Message: hidePrivacy(err.Error()),
39 // Data: nil,
40 //})
41 //c.Abort()
42}
43
44// ErrorPage is used to return error page HTML.
45// It also returns standard HTTP status code.

Callers 15

SendHandleMethod · 0.92
AuthFunction · 0.92
AuthnFunction · 0.92
SearchIndexFunction · 0.92
FsUpFunction · 0.92
FsGetDirectUploadInfoFunction · 0.92
UpdateIndexFunction · 0.92
GetProgressFunction · 0.92
ListStoragesFunction · 0.92
CreateStorageFunction · 0.92
UpdateStorageFunction · 0.92
DeleteStorageFunction · 0.92

Calls 1

ErrorWithDataRespFunction · 0.85

Tested by

no test coverage detected