mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-06-05 06:40:37 +08:00
12 lines
252 B
JavaScript
12 lines
252 B
JavaScript
module.exports = require('mdoq')
|
|
.require('mdoq-http')
|
|
.use(function (req, res, next) {
|
|
if(res.statusCode >= 400) {
|
|
var err = res.data.error || res.data;
|
|
res.data = undefined;
|
|
next(err);
|
|
} else {
|
|
next();
|
|
}
|
|
})
|
|
; |