Description
I have an Azure Functions Service Bus trigger throwing an unhandled exception in the code, I was hoping to see a failure, but the request telemetry still shows success=True. Also, it seems like resultCode only applies to HTTP triggers, as it always shows 0 for Service Bus.
In contrast, HttpTrigger correctly sets success:False when an unhandled error occurs and has the right resultCode.
[Function(nameof(SB))]
public async Task Run(
[ServiceBusTrigger("queue", Connection = "ServiceBusConnection")]ServiceBusReceivedMessage message, ServiceBusMessageActions messageActions)
{
_logger.LogInformation("Message ID: {id}", message.MessageId);
// Complete the message
await messageActions.CompleteMessageAsync(message);
//throw new ArgumentNullException("This is a test exception");
}
It is same with EventHub as well,
