MCPcopy Index your code
hub / github.com/openshift/osin / setErrorAndLog

Method setErrorAndLog

access.go:557–564  ·  view source on GitHub ↗

setErrorAndLog sets the response error and internal error (if non-nil) and logs them along with the provided debug format string and arguments.

(w *Response, responseError string, internalError error, debugFormat string, debugArgs ...interface{})

Source from the content-addressed store, hash-verified

555
556// setErrorAndLog sets the response error and internal error (if non-nil) and logs them along with the provided debug format string and arguments.
557func (s Server) setErrorAndLog(w *Response, responseError string, internalError error, debugFormat string, debugArgs ...interface{}) {
558 format := "error=%v, internal_error=%#v " + debugFormat
559
560 w.InternalError = internalError
561 w.SetError(responseError, "")
562
563 s.Logger.Printf(format, append([]interface{}{responseError, internalError}, debugArgs...)...)
564}

Callers 10

TestServerErrorLoggerFunction · 0.95
HandleAccessRequestMethod · 0.95
handlePasswordRequestMethod · 0.95
FinishAccessRequestMethod · 0.95
getClientMethod · 0.95
HandleInfoRequestMethod · 0.95
getClientAuthMethod · 0.95

Calls 2

SetErrorMethod · 0.80
PrintfMethod · 0.65

Tested by 1

TestServerErrorLoggerFunction · 0.76