Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

预约数量限制没有实现(web服务器和前端没有处理错误信息) #2

Closed
renfeisong opened this issue Dec 21, 2014 · 3 comments
Assignees

Comments

@renfeisong
Copy link
Collaborator

如果用户预约已经不能预约的医生,我会将用户跳转到doctor页面,并且附带一个参数errCode,值为3011(如果没有这类错误,errCode的值为空)。 @qinbingchen 你只需要在doctor页面检测errCode并给出错误提示即可。

@renfeisong
Copy link
Collaborator Author

另外,business服务器给出提示{"code":"3011","message":"You have already had one appointment at that period for the same department"}的同时也会崩溃(不过又自动重启了,因此看不出来)。崩溃信息如下:

Sun, 21 Dec 2014 17:12:29 GMT business Uncaught exception occurred
Sun, 21 Dec 2014 17:12:29 GMT business Request :
Sun, 21 Dec 2014 17:12:29 GMT business  Headers : { 'content-type': 'application/x-www-form-urlencoded',
  host: 'localhost:3001',
  connection: 'keep-alive',
  'transfer-encoding': 'chunked' }
Sun, 21 Dec 2014 17:12:29 GMT business  Url : /user/reservation/add
Sun, 21 Dec 2014 17:12:29 GMT business  Method : POST
Sun, 21 Dec 2014 17:12:29 GMT business Error:  { [Error: Can't set headers after they are sent.]
  domain: 
   { domain: null,
     _events: { error: [Function: onError] },
     _maxListeners: 10,
     members: [ [Object], [Object] ] },
  domainThrown: true }
Sun, 21 Dec 2014 17:12:29 GMT business Route:  { methods: [ 'POST' ],
  name: 'postuserreservationadd',
  params: {},
  spec: 
   { path: '/user/reservation/add',
     method: 'POST',
     versions: [],
     name: 'postuserreservationadd' } }

/Users/renfei/Documents/Projects/SAD/base/BusinessServer/node_modules/mysql/lib/protocol/Parser.js:82
        throw err;
              ^
Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (http.js:689:11)
    at ServerResponse.format (/Users/renfei/Documents/Projects/SAD/base/BusinessServer/node_modules/restify/lib/response.js:95:10)
    at ServerResponse.send (/Users/renfei/Documents/Projects/SAD/base/BusinessServer/node_modules/restify/lib/response.js:205:24)
    at ServerResponse.json (/Users/renfei/Documents/Projects/SAD/base/BusinessServer/node_modules/restify/lib/response.js:139:18)
    at /Users/renfei/Documents/Projects/SAD/base/BusinessServer/controllers/reservation.js:149:45
    at createNext (/Users/renfei/Documents/Projects/SAD/base/BusinessServer/node_modules/orm/lib/Model.js:565:12)
    at /Users/renfei/Documents/Projects/SAD/base/BusinessServer/node_modules/orm/lib/Model.js:587:6
    at /Users/renfei/Documents/Projects/SAD/base/BusinessServer/node_modules/orm/lib/Instance.js:612:12
    at Instance.saveInstanceExtra (/Users/renfei/Documents/Projects/SAD/base/BusinessServer/node_modules/orm/lib/Instance.js:334:19)
    at /Users/renfei/Documents/Projects/SAD/base/BusinessServer/node_modules/orm/lib/Instance.js:183:5
worker 14240 died

@buaayz 看一下

renfeisong added a commit that referenced this issue Dec 21, 2014
@qinbingchen
Copy link
Collaborator

Fixed.

@FlyingBlazer
Copy link
Owner

后台错误处理已正常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants