diff --git a/docs/en/UI/Blazor/Error-Handling.md b/docs/en/UI/Blazor/Error-Handling.md index 6582ee0c8e..18cb958f72 100644 --- a/docs/en/UI/Blazor/Error-Handling.md +++ b/docs/en/UI/Blazor/Error-Handling.md @@ -23,12 +23,12 @@ There are different type of `Exception` classes handled differently by the ABP F `UserFriendlyException` is a special type of exception. You can directly show a error message dialog to the user by throwing such an exception. +{{if UI == "BlazorServer"}} + > For Blazor Server, exceptions must be handled manually. Otherwise it crashes the whole application. Auto Exception Handling is not possible with Blazor Server right now, please follow [this issue](https://github.com/abpframework/abp/issues/8195) to see progress. In meantime, you can use try-catch blocks and call the `HandleErrorAsync` method of ABP to handle errors manually, which shows an error dialog for you. **Example** -{{if UI == "BlazorServer"}} - ````csharp @page "/" @using Volo.Abp @@ -55,6 +55,8 @@ There are different type of `Exception` classes handled differently by the ABP F {{if UI == "Blazor"}} +**Example** + ````csharp @page "/" @using Volo.Abp @@ -97,4 +99,4 @@ Errors (like Validation, Authorization and User Friendly Errors) sent by the ser ## See Also -* [Exception Handling System](../../Exception-Handling.md) \ No newline at end of file +* [Exception Handling System](../../Exception-Handling.md) diff --git a/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs index 86500cf434..78e26e7c32 100644 --- a/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs @@ -108,9 +108,17 @@ public class AzureDistributedEventBus : DistributedEventBusBase, ISingletonDepen foreach (var outgoingEvent in outgoingEventArray) { - if (!messageBatch.TryAddMessage(new ServiceBusMessage(outgoingEvent.EventData) { Subject = outgoingEvent.EventName })) + var message = new ServiceBusMessage(outgoingEvent.EventData) { Subject = outgoingEvent.EventName }; + + if (message.MessageId.IsNullOrWhiteSpace()) + { + message.MessageId = outgoingEvent.Id.ToString(); + } + + if (!messageBatch.TryAddMessage(message)) { - throw new AbpException("The message is too large to fit in the batch. Set AbpEventBusBoxesOptions.OutboxWaitingEventMaxCount to reduce the number"); + throw new AbpException( + "The message is too large to fit in the batch. Set AbpEventBusBoxesOptions.OutboxWaitingEventMaxCount to reduce the number"); } }