MCPcopy Create free account
hub / github.com/cloudfoundry/multiapps-cli-plugin / NewCustomError

Function NewCustomError

testutil/test_results.go:73–80  ·  view source on GitHub ↗

generate a custom APIError for mocking test failures

(customCode int, opName, customMessage string)

Source from the content-addressed store, hash-verified

71
72// generate a custom APIError for mocking test failures
73func NewCustomError(customCode int, opName, customMessage string) *runtime.APIError {
74 var customResponse = RuntimeResponse{
75 code: customCode,
76 message: customMessage,
77 }
78
79 return runtime.NewAPIError(opName, customResponse, customCode)
80}
81
82var notFoundResponse = RuntimeResponse{
83 code: 404,

Calls

no outgoing calls

Tested by

no test coverage detected