quill icon indicating copy to clipboard operation
quill copied to clipboard

Crash When Updating/Adding Application Before Registration Opens Date

Open phillip-shvartsman opened this issue 8 years ago • 2 comments

get the following error when trying to update/add application before registration opens date, is only able to be done by the admin or in the event of the registration open changing: `PUT /api/users/5a5d9a6c855a1d2e53ee7db2/profile 200 64.404 ms - 490 events.js:160 throw er; // Unhandled 'error' event ^

Error: Can't set headers after they are sent. at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:356:11) at ServerResponse.header (/home/quill/quill-MakeOHIO-2018/node_modules/express/lib/response.js:767:10) at ServerResponse.send (/home/quill/quill-MakeOHIO-2018/node_modules/express/lib/response.js:170:12) at ServerResponse.json (/home/quill/quill-MakeOHIO-2018/node_modules/express/lib/response.js:267:15) at ServerResponse.send (/home/quill/quill-MakeOHIO-2018/node_modules/express/lib/response.js:158:21) at /home/quill/quill-MakeOHIO-2018/app/server/routes/api.js:102:34 at /home/quill/quill-MakeOHIO-2018/app/server/controllers/UserController.js:299:16 at /home/quill/quill-MakeOHIO-2018/app/server/models/Settings.js:68:7 at /home/quill/quill-MakeOHIO-2018/node_modules/mongoose/lib/query.js:3115:18 at newTickHandler (/home/quill/quill-MakeOHIO-2018/node_modules/mpromise/lib/promise.js:234:18) at _combinedTickCallback (internal/process/next_tick.js:73:7) at process._tickCallback (internal/process/next_tick.js:104:9)'

phillip-shvartsman avatar Jan 18 '18 21:01 phillip-shvartsman

Hi @phillip-shvartsman, are you still having this issue? I'm not entirely clear on what you're trying to do -- when do you need to "add an application before registration opens"?

jlin816 avatar Jan 22 '18 06:01 jlin816

Hey, I'm not saying you ever would normally. But if you are just testing things out with the admin account or you change the registration date around you could submit an application before the registration date. It would be unclear to the user why the server is crashing. Would be good to prevent the user from submitting an application before the registration begin date or have a notification on the client side. We had this situation happen to us, and we're not very experienced with node.js so it took us a bit to see what was the problem. Just a nitpick love your product! I think we could do a pull request for this issue.

phillip-shvartsman avatar Jan 22 '18 16:01 phillip-shvartsman