When incorrect, reply the errors too
Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
parent
3f50e71953
commit
6c5b7e2c86
|
@ -25,6 +25,10 @@ app.post('/', function (req, res) {
|
||||||
try {
|
try {
|
||||||
var event = unmarshaller.unmarshall(req.body, req.headers);
|
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)
|
res.status(201)
|
||||||
.send("Event Accepted");
|
.send("Event Accepted");
|
||||||
}catch(e) {
|
}catch(e) {
|
||||||
|
|
Loading…
Reference in New Issue