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

Function InternalServerError

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

InternalServerError logs to the server's terminal and dispatches to the client the 500 Internal Server Error. Internal Server errors are critical, so we log them to the `os.Stderr`.

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

Source from the content-addressed store, hash-verified

115// and dispatches to the client the 500 Internal Server Error.
116// Internal Server errors are critical, so we log them to the `os.Stderr`.
117func InternalServerError(ctx iris.Context, err error, format string, args ...interface{}) {
118 LogFailure(os.Stderr, ctx, Fail(ctx, iris.StatusInternalServerError, err, format, args...))
119}
120
121// InternalServerErrorJSON acts exactly like `InternalServerError` but instead it sends the data as JSON.
122// Useful for APIs.

Callers

nothing calls this directly

Calls 2

LogFailureFunction · 0.85
FailFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…