If we call a route like /api/v1/default/toto, I have this error :
debug: [FootprintController] (find) model = default , criteria = {} info options =
Debug: internal, implementation, error
TypeError: Uncaught error: Cannot read property 'findOne' of undefined
at FootprintService.find (/Users/jaumard/Downloads/testTrails/node_modules/trailpack-waterline/api/services/FootprintService.js:46:20)
at FootprintController.find (/Users/jaumard/Downloads/testTrails/node_modules/trailpack-hapi/api/controllers/FootprintController.js:46:35)
at result.method.finalize (/Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/handler.js:215:20)
at Object.exports.execute.internals.prerequisites.internals.handler.callback [as handler] (/Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/handler.js:96:36)
at /Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/handler.js:63:26
at done (/Users/jaumard/Downloads/testTrails/node_modules/hapi/node_modules/items/lib/index.js:31:25)
at done (/Users/jaumard/Downloads/testTrails/node_modules/hapi/node_modules/items/lib/index.js:63:25)
at /Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/handler.js:49:28
at finalize (/Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/handler.js:281:20)
at wrapped (/Users/jaumard/Downloads/testTrails/node_modules/hapi/node_modules/hoek/lib/index.js:867:20)
at internals.Response._prepare.internals.Response._processPrepare.next [as _processPrepare] (/Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/response.js:448:16)
at internals.Response._prepare.next [as _prepare] (/Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/response.js:387:21)
at /Users/jaumard/Downloads/testTrails/node_modules/hapi/lib/reply.js:151:22
at doNTCallback0 (node.js:408:9)
at process._tickDomainCallback (node.js:378:13)
A better error message can be send like no model default or just 500 server error
If we call a route like
/api/v1/default/toto, I have this error :A better error message can be send like
no model defaultor just500 server error