{"action":"created","issue":{"url":"https://api.github.com/repos/trailsjs/trailpack-hapi/issues/30","repository_url":"https://api.github.com/repos/trailsjs/trailpack-hapi","labels_url":"https://api.github.com/repos/trailsjs/trailpack-hapi/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/trailsjs/trailpack-hapi/issues/30/comments","events_url":"https://api.github.com/repos/trailsjs/trailpack-hapi/issues/30/events","html_url":"https://github.com/trailsjs/trailpack-hapi/issues/30","id":127550280,"number":30,"title":"Wrong footprint error message","user":{"login":"jaumard","id":2970449,"avatar_url":"https://avatars.githubusercontent.com/u/2970449?v=3","gravatar_id":"","url":"https://api.github.com/users/jaumard","html_url":"https://github.com/jaumard","followers_url":"https://api.github.com/users/jaumard/followers","following_url":"https://api.github.com/users/jaumard/following{/other_user}","gists_url":"https://api.github.com/users/jaumard/gists{/gist_id}","starred_url":"https://api.github.com/users/jaumard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaumard/subscriptions","organizations_url":"https://api.github.com/users/jaumard/orgs","repos_url":"https://api.github.com/users/jaumard/repos","events_url":"https://api.github.com/users/jaumard/events{/privacy}","received_events_url":"https://api.github.com/users/jaumard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/trailsjs/trailpack-hapi/labels/bug","name":"bug","color":"800000"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-01-19T22:07:34Z","updated_at":"2016-06-27T17:38:23Z","closed_at":null,"body":"If we call a route like `/api/v1/default/toto`, I have this error : \r\n\r\n```\r\ndebug: [FootprintController] (find) model = default , criteria = {} info options =\r\nDebug: internal, implementation, error \r\n    TypeError: Uncaught error: Cannot read property 'findOne' of undefined\r\n    at FootprintService.find (/Users/jaumard/Downloads/testTrails/node_modules/trailpack-waterline/api/services/FootprintService.js:46:20)\r\n    at FootprintController.find (/Users/jaumard/Downloads/testTrails/node_modules/trailpack-hapi/api/controllers/FootprintController.js:46:35)\r\n    at result.method.finalize (/Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/handler.js:215:20)\r\n    at Object.exports.execute.internals.prerequisites.internals.handler.callback [as handler] (/Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/handler.js:96:36)\r\n    at /Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/handler.js:63:26\r\n    at done (/Users/jaumard/Downloads/testTrails/node_modules/hapi/node_modules/items/lib/index.js:31:25)\r\n    at done (/Users/jaumard/Downloads/testTrails/node_modules/hapi/node_modules/items/lib/index.js:63:25)\r\n    at /Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/handler.js:49:28\r\n    at finalize (/Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/handler.js:281:20)\r\n    at wrapped (/Users/jaumard/Downloads/testTrails/node_modules/hapi/node_modules/hoek/lib/index.js:867:20)\r\n    at internals.Response._prepare.internals.Response._processPrepare.next [as _processPrepare] (/Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/response.js:448:16)\r\n    at internals.Response._prepare.next [as _prepare] (/Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/response.js:387:21)\r\n    at /Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/reply.js:151:22\r\n    at doNTCallback0 (node.js:408:9)\r\n    at process._tickDomainCallback (node.js:378:13)\r\n```\r\n\r\nA better error message can be send like `no model default` or just `500 server error`"},"comment":{"url":"https://api.github.com/repos/trailsjs/trailpack-hapi/issues/comments/228818003","html_url":"https://github.com/trailsjs/trailpack-hapi/issues/30#issuecomment-228818003","issue_url":"https://api.github.com/repos/trailsjs/trailpack-hapi/issues/30","id":228818003,"user":{"login":"mautematico","id":1238928,"avatar_url":"https://avatars.githubusercontent.com/u/1238928?v=3","gravatar_id":"","url":"https://api.github.com/users/mautematico","html_url":"https://github.com/mautematico","followers_url":"https://api.github.com/users/mautematico/followers","following_url":"https://api.github.com/users/mautematico/following{/other_user}","gists_url":"https://api.github.com/users/mautematico/gists{/gist_id}","starred_url":"https://api.github.com/users/mautematico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mautematico/subscriptions","organizations_url":"https://api.github.com/users/mautematico/orgs","repos_url":"https://api.github.com/users/mautematico/repos","events_url":"https://api.github.com/users/mautematico/events{/privacy}","received_events_url":"https://api.github.com/users/mautematico/received_events","type":"User","site_admin":false},"created_at":"2016-06-27T17:38:23Z","updated_at":"2016-06-27T17:38:23Z","body":"Is there a way I can help with this?\r\nI have particular interest on fixing the king of errors jaumard refers to on his last comment.\r\nRelated to this: https://github.com/trailsjs/trailpack-sequelize/pull/23"}}
{"actor":{"display_login":"mautematico"}}