正在显示
4 个修改的文件
包含
21 行增加
和
2 行删除
... | ... | @@ -35,6 +35,12 @@ exports = module.exports = function(logger, settings) { |
35 | 35 | // set error type |
36 | 36 | error.type = res.statusCode < 500 ? 'invalid_request_error' : 'api_error' |
37 | 37 | |
38 | + if (_.isString(err.param)) { | |
39 | + error.type = 'invalid_request_error' | |
40 | + if (res.statusCode === 500) | |
41 | + res.statusCode = 400 | |
42 | + } | |
43 | + | |
38 | 44 | /* |
39 | 45 | error.type = _.isString(err.param) ? 'invalid_request_error' : 'api_error' |
40 | 46 | ... | ... |
lib/boot/knex.js
0 → 100644
1 | 1 | { |
2 | 2 | "name": "igloo", |
3 | - "version": "0.0.4-rc.1", | |
3 | + "version": "0.0.4-rc.2", | |
4 | 4 | "description": "Igloo is a lightweight, fast, and minimal framework for rapid development", |
5 | 5 | "main": "./lib", |
6 | 6 | "repository": { |
... | ... | @@ -19,8 +19,10 @@ |
19 | 19 | "commander": "^2.2.0", |
20 | 20 | "connect-redis": "~2.0.0", |
21 | 21 | "express-session": "^1.2.1", |
22 | + "knex": "^0.6.13", | |
22 | 23 | "merge-defaults": "^0.1.0", |
23 | 24 | "mongoose": "~3.8.7", |
25 | + "mysql": "^2.3.2", | |
24 | 26 | "to-camel-case": "^0.2.1", |
25 | 27 | "underscore": "~1.6.0", |
26 | 28 | "update-notifier": "git://github.com/niftylettuce/update-notifier", | ... | ... |
请
注册
或
登录
后发表评论