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

Crash When Updating/Adding Application Before Registration Opens Date #58

Open
phillip-shvartsman opened this issue Jan 18, 2018 · 2 comments

Comments

@phillip-shvartsman
Copy link

phillip-shvartsman commented Jan 18, 2018

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)'

@jlin816
Copy link
Contributor

jlin816 commented Jan 22, 2018

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"?

@phillip-shvartsman
Copy link
Author

phillip-shvartsman commented Jan 22, 2018

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.

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

2 participants