MCPcopy Create free account
hub / github.com/cloudfoundry/garden / StatusCode

Method StatusCode

errors.go:39–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39func (m Error) StatusCode() int {
40 switch m.Err.(type) {
41 case ContainerNotFoundError:
42 return http.StatusNotFound
43 case ProcessNotFoundError:
44 return http.StatusNotFound
45 }
46
47 return http.StatusInternalServerError
48}
49
50func (m Error) MarshalJSON() ([]byte, error) {
51 var errorType errType

Callers 1

writeErrorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected