Tuesday, 23 May 2017

Exception 'TypeError: Object prototype may only be an Object or null' running dyson mock server (using express.js)

Running the webpro/dyson-demo (node.js) as a mock server and attempted to return a canned data, for example:

module.exports = {
  path: '/query?',
  collection: false,
  template: function(params, query, body, cookies, headers) {
        return cannedJsonFromFile;
    },

};

But received the error message (dyson uses Express.js):

"Potentially unhandled rejection [1] TypeError: Object prototype may only be an Object or null: ..." (bottom of stack): at c:\dev\projects\noms\navmps.services.demo\dyson-mock-oob-server\dyson-demo\node_modules\dyson\lib\response.js:82:53



via alturium

No comments:

Post a Comment