Skip to content

Commit 6c5b7e2

Browse files
committed
When incorrect, reply the errors too
Signed-off-by: Fabio José <[email protected]>
1 parent 3f50e71 commit 6c5b7e2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/express-ex/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ app.post('/', function (req, res) {
2525
try {
2626
var event = unmarshaller.unmarshall(req.body, req.headers);
2727

28+
// pretty print
29+
console.log("Accepted event:");
30+
console.log(JSON.stringify(event.format(), null, 2));
31+
2832
res.status(201)
2933
.send("Event Accepted");
3034
}catch(e) {

0 commit comments

Comments
 (0)