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

Server Crashing at GET->'api/skribbl' with unknown ID #28

Closed
tcandens opened this issue May 21, 2015 · 0 comments
Closed

Server Crashing at GET->'api/skribbl' with unknown ID #28

tcandens opened this issue May 21, 2015 · 0 comments

Comments

@tcandens
Copy link
Contributor

It will not crash if id cannot be cast to Mongo ObjectId, but it is crashing for me if the ID is the correct length but does not exist in the database.

/home/joey/Codefellows/exquisite/lib/tree3_by_id.js:13
  Skribbl.find({ parent_skribbl: topParent._id }, function( err, first_childre
                                          ^
TypeError: Cannot read property '_id' of null
    at buildTree (/home/joey/Codefellows/exquisite/lib/tree3_by_id.js:13:43)
    at /home/joey/Codefellows/exquisite/routes/skribbl_routes.js:62:7
    at /home/joey/Codefellows/exquisite/node_modules/mongoose/lib/query.js:1173:16
    at /home/joey/Codefellows/exquisite/node_modules/mongoose/node_modules/kareem/index.js:109:16
    at process._tickDomainCallback (node.js:486:13)
21 May 11:13:35 - [nodemon] app crashed - waiting for file changes before starting...

Is any body else able to replicate?

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

1 participant