MCPcopy Create free account
hub / github.com/gogs/gogs / ErrorStatus

Method ErrorStatus

internal/context/api.go:40–45  ·  view source on GitHub ↗

ErrorStatus renders error with given status code.

(status int, err error)

Source from the content-addressed store, hash-verified

38
39// ErrorStatus renders error with given status code.
40func (c *APIContext) ErrorStatus(status int, err error) {
41 c.JSON(status, map[string]string{
42 "message": err.Error(),
43 "url": DocURL,
44 })
45}
46
47// Error renders the 500 response.
48func (c *APIContext) Error(err error, msg string) {

Callers 15

ErrorMethod · 0.95
CreateMethod · 0.80
AddEmailFunction · 0.80
DeleteEmailFunction · 0.80
DeletePublicKeyFunction · 0.80
CreateOrgForUserFunction · 0.80
ListIssueCommentsFunction · 0.80
ListRepoIssueCommentsFunction · 0.80
CreateUserRepoFunction · 0.80
CreateFunction · 0.80
CreateOrgRepoFunction · 0.80
MigrateFunction · 0.80

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected