generate a custom APIError for mocking test failures
(customCode int, opName, customMessage string)
| 71 | |
| 72 | // generate a custom APIError for mocking test failures |
| 73 | func 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 | |
| 82 | var notFoundResponse = RuntimeResponse{ |
| 83 | code: 404, |
no outgoing calls
no test coverage detected