Activities of "christophe.baille"

Actually my issue is different:

When I was doing some tests on my main project, I had the issue that it was not showing the message but "An internal error occured during your request".

It was my mistake as while implementing it for testing, I forgot to add

        Configure<AbpExceptionLocalizationOptions>(options =>
        {
            options.MapCodeNamespace("MyApp.ErrorCodes", typeof(MyAppResource));
        });

I then added it and now the test is working well.

So you were completely right about when I was having "An internal error occured during your request" instead of my message, the localization text was missing.

However my initial issue is coming from a module"linked" to the main project.

I had a look on it and all is well implemented, localization is all fine.

What I do not really understand, is that anytimes (I mean even with or without localization), the message I get is different:

"Exception of type 'Volo.Abp.BusinessException' was thrown."

which is not "An internal error occured during your request"

Like if the BusinessException is shown differently.

My main project is on Blazor server, the module UI is Blazor Webassembly

Hi,

This is the point about "if there is no localization text" that annoy me, from the doc it is what I understood as well but even with a localization text I got generic message:

I tried to define either with "Localizer" or "LocalizationRessource", with either define on constructor or using DI (then I guess BusinessException localize automatically without using Localizer[] as we used everywhere?):

My json ressource file:

But still got this generic error:

the ressource seems ok as I got this on UserFriendlyException:

I see, from what you show me is that BusinessException do not show the error message but a generic error anytime right?

Hi,

It remains the same, by configuring the localization it will change the text shown only. My issue here is that BusinessException do not return the message expected but "Exception of type..."

Here is my code on the Appservice which I call through a Blazor server page (I did put the thow here as example):

UserFriendlyException show the text

BusinessException do not

  • ABP Framework version: v5.3.2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

Some BusinessException have been implemented and follow this doc.

https://docs.abp.io/en/abp/latest/Exception-Handling#business-exceptions

If it put the correct information on AbpAuditLogs table which is good, the "popup" do not show exactly what I would expect.

It is not good as the final user will not understand the error

I use this code to throw the error:

            throw new BusinessException(AIGeneratorErrorCodes.ProjectManagement.ProjectMaxCountExceeded)
                .WithData("MaxCount", AIGeneratorConsts.Project.MaxNumberOfProjectsPerUser);

By replacing it with UserFriendlyException, it show the code correctly (apart that I will need to use localizer to get the text), but information are not that good on the AbpAuditLogs table, in Exception field, I do not have MaxCount.

Is there any way to make the popup text for BusinessException as clear as UserFriendlyException?

Hi,

I find the issue. I moved my solution to another folder without any other solution and it works, let me explain:

I have a folder where I have all my solution folders, each solution folder contains sln files, and csproj and files:

  • C:\Source\Solution 1
  • C:\Source\Solution 2

When I was trying to update my package on Solution 2, it was giving me the name of the Solution 1 updated on the log.

So I moved my solution 2 to another folder and nothing else:

  • C:\TESTMIGRATE\Solution 2

And now it is working (partially, I will explain later)

So,the problem is that abp suite go to one level too "high" about finding the sln file, which means it goes out of the solution directory, and get on each folder to try to find a sln file. In my case, it went to this botadmin sln (by alphabetical order, it was the first folder having a sln file). It didn't update packages as it is a aspzero solution.

I made another quick test that you can do too, by copying my solution in another folder a-Solution 2, to have:

  • C:\TESTMIGRATE\A-Solution 2
  • C:\TESTMIGRATE\Solution 2

When I run the update for the solution on folder Solution 2, it will update the csproj of the folder A-Solution 2

What I said about partially working, is that it updates all the csproj from our src folder, but it doesn't update the one from a module we created inside another subfolder (module, same level as src folder). We created modules manually and is not a solution by itself, it is normal behaviour?

I found the message on the log yes, and solution path is correct.

On the same log file, a bit before, around 24 lines, I got this message that mention the name of another project. Just before "Checking installed npm global packages...". Do you have an idea where this name come from? We have a solution having the same name (In aspZero though), but in properties of our solution or in any files, I can't find this name yet.

2022-08-10 11:56:02.155 +02:00 [INF] Volo packages are updated in Kwork.BotAdmin.All solution. --> This is wrong solution name 2022-08-10 11:56:03.926 +02:00 [INF] Checking installed npm global packages...

Not sure it is the cause of the issue though, updates were working fine some times ago

I guess it is an issue of the project yes, I can not share it, and don't think it will be easy to reproduce it...

I tried to remove ABP Suite and ABL CLI from my computer and delete .abp folder to reinstall all.

I tried to update again and get same issue, I did run in admin user, to be sure.

I found something strange on suite-log file, is this message:

Volo packages are updated in Kwork.BotAdmin.All solution

which is not the solution I try to update. I had a look on the source code, but no find any text "BotAdmin"

Showing 51 to 60 of 188 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13