I have a javascript Azure function that puts a message on a Service Bus queue:
module.exports = function (context, req) {
var flatten = require('flat')
var message = flatten(req.body);
context.bindings.outputSbMsg = message;
context.done();
};
When it runs via a Http trigger, the function completes successfully. However, the message ends up on the Dead Letter queue in Service Bus. I can't see any error in the logs. Where should I look to investigate what the cause of this is?