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

Function InternalServerErrorJSON

_examples/database/mongodb/httputil/error.go:123–125  ·  view source on GitHub ↗

InternalServerErrorJSON acts exactly like `InternalServerError` but instead it sends the data as JSON. Useful for APIs.

(ctx iris.Context, err error, format string, args ...interface{})

Source from the content-addressed store, hash-verified

121// InternalServerErrorJSON acts exactly like `InternalServerError` but instead it sends the data as JSON.
122// Useful for APIs.
123func InternalServerErrorJSON(ctx iris.Context, err error, format string, args ...interface{}) {
124 LogFailure(os.Stderr, ctx, FailJSON(ctx, iris.StatusInternalServerError, err, format, args...))
125}
126
127// UnauthorizedJSON sends JSON format of StatusUnauthorized(401) HTTPError value.
128func UnauthorizedJSON(ctx iris.Context, err error, format string, args ...interface{}) HTTPError {

Callers

nothing calls this directly

Calls 2

LogFailureFunction · 0.85
FailJSONFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…