From 6c5b7e2c86c3a9c493ab6e3b3204a373c4b928a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Tue, 25 Jun 2019 10:54:39 -0300 Subject: [PATCH] When incorrect, reply the errors too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- examples/express-ex/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/express-ex/index.js b/examples/express-ex/index.js index ad993b0..2b5e783 100644 --- a/examples/express-ex/index.js +++ b/examples/express-ex/index.js @@ -25,6 +25,10 @@ app.post('/', function (req, res) { try { var event = unmarshaller.unmarshall(req.body, req.headers); + // pretty print + console.log("Accepted event:"); + console.log(JSON.stringify(event.format(), null, 2)); + res.status(201) .send("Event Accepted"); }catch(e) {