MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / abortWithError

Function abortWithError

cmd/cql-proxy/api/utils.go:36–44  ·  view source on GitHub ↗
(c *gin.Context, code int, err error)

Source from the content-addressed store, hash-verified

34)
35
36func abortWithError(c *gin.Context, code int, err error) {
37 if err != nil {
38 _ = c.Error(err)
39 c.AbortWithStatusJSON(code, gin.H{
40 "success": false,
41 "msg": err.Error(),
42 })
43 }
44}
45
46func responseWithData(c *gin.Context, code int, data interface{}) {
47 c.JSON(code, gin.H{

Callers 15

applyTokenFunction · 0.85
showAllAccountsFunction · 0.85
getBalanceFunction · 0.85
setMainAccountFunction · 0.85
userOAuthAPICallbackFunction · 0.85
userCheckRequireLoginFunction · 0.85
projectIDInjectFunction · 0.85
getUserInfoFunction · 0.85
userAuthLogoutFunction · 0.85
userSessionInjectFunction · 0.85
genKeyPairFunction · 0.85
uploadKeyPairFunction · 0.85

Calls 1

ErrorMethod · 0.80

Tested by

no test coverage detected