(err)
| 226 | } |
| 227 | |
| 228 | function sendError(err) { |
| 229 | if (typeof next === 'function') { |
| 230 | return next(err); |
| 231 | } |
| 232 | |
| 233 | res.setHeader('Content-Type', 'text/plain'); |
| 234 | respond(500, err.toString()); |
| 235 | } |
| 236 | |
| 237 | function respond(code, data) { |
| 238 | data = new Buffer(data); |
no test coverage detected