loopback-next unable to send object in reposnse
when I try to return an object I always get the following error on the console, and no response is returned,
loopback-next seems to work only for string data type in response
(node:20186) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: First argument must be a string or Buffer
(node:20186) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@bajtos I believe this is the reason why we JSON.stringify the response in the initial router correct? Do you have a story to work on this for the current sprint? @deepakrkris @mpatsute @siddhipai need it for part of their loopback-example-facade to loobpack-next port.
Link to the code?
https://github.com/strongloop/loopback-next/blob/master/packages/example-codehub/src/controllers/HealthController.ts#L16
This will be fixed by https://github.com/strongloop/loopback-next/pull/106