MCPcopy Create free account
hub / github.com/kataras/iris / Data

Method Data

x/errors/errors.go:283–285  ·  view source on GitHub ↗

Data sends an error with a message and json data to the client.

(ctx *context.Context, msg string, data interface{})

Source from the content-addressed store, hash-verified

281
282// Data sends an error with a message and json data to the client.
283func (e ErrorCodeName) Data(ctx *context.Context, msg string, data interface{}) {
284 fail(ctx, e, msg, "", nil, data)
285}
286
287// DataWithDetails sends an error with a message, details and json data to the client.
288func (e ErrorCodeName) DataWithDetails(ctx *context.Context, msg, details string, data interface{}) {

Callers 2

fireErrorWithProblemFunction · 0.80
handleAPIErrorFunction · 0.80

Calls 1

failFunction · 0.70

Tested by

no test coverage detected