BusinessException is not being converted to proper HTTP Response
When throwing a BusinessException, the HTTP response should write Error Code, Error Message, and Error Details properties to the response.
This is where a business exception is being thrown: https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/MultiTenancyMiddleware.cs#L40
But there's no response text.

Besides, it would be good if we can specify the HTTP Error code when throwing the business exceptions. If the resource is not found, I would like to throw 404; if the user is not granted permission: 403, etc...
Example: https://stackoverflow.com/a/38935583/1767482
Actually it is converted to Forbidden by default:
https://github.com/abpframework/abp/blob/bb46a964bce85eeef39efb70641f2ec0f560ee75/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultHttpExceptionStatusCodeFinder.cs#L23-L64
ABP handles exceptions with an MVC filter. However, you are throwing in a middleware. In order to handle it we need to add another middleware before it (I don't suggest it).
I suggest you to not throw business exceptions inside an asp.net core middleware (since it is not a "business" layer), but directly return any HTTP Status code and message you need.
@hikalkan is this the recommended location to have a BusinessException
https://docs.abp.io/en/abp/latest/Tutorials/Part-6?UI=NG&DB=EF#authormanager-the-domain-service

@ebicoglu can you assist on the above.
hi @ebicoglu
We should also configure the AbpExceptionLocalizationOptions
https://github.com/abpframework/abp/commit/4bc619c4c2c6f5a32efc87bd293e85dfe1eb5b1a
@maliming just a note, it worked after applying your fix.
But the title of the toaster service in angular shows
"An error has occurred!" and my localized message was shown correctly.
I tried to set the BusinessException "Message" and "Details" properties. but still no go.
hi @buaziz If this problem related angular please create a new issue.
@maliming https://github.com/abpframework/abp/issues/4986