(ctx)
| 19 | * @returns {*} the publish response |
| 20 | */ |
| 21 | export function response(ctx) { |
| 22 | const { statusCode, body } = ctx.result; |
| 23 | // if response is 200, return the response |
| 24 | if (statusCode === 200) { |
| 25 | return body; |
| 26 | } |
| 27 | // if response is not 200, append the response to error block. |
| 28 | util.appendError(body, statusCode); |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Sends an HTTP request |
nothing calls this directly
no outgoing calls
no test coverage detected