MCPcopy Create free account
hub / github.com/pace/bricks / setHTTPStatus

Method setHTTPStatus

http/jsonapi/runtime/error.go:43–45  ·  view source on GitHub ↗

setHttpStatus sets the http status for the error object

(code int)

Source from the content-addressed store, hash-verified

41
42// setHttpStatus sets the http status for the error object
43func (e *Error) setHTTPStatus(code int) {
44 e.Status = strconv.Itoa(code)
45}
46
47// Error implements the error interface
48func (e Error) Error() string {

Callers 2

TestErrorFunction · 0.95
WriteErrorFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestErrorFunction · 0.76