hi
What is your abp license type? Team or Business? What is your CLI version? Can you try to install the latest one?
Thanks.
Great 👍
hi
If you specify the mapper context (TaskManagementBlazorModule), you must specify it when using it.
context.Services.AddAutoMapperObjectMapper<TaskManagementBlazorModule>();
Check your base class and set the ObjectMapperContext = typeof(TaskManagementBlazorModule);
Thanks.
hi
Can you add code below to your Blazor project?
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper();
}
Thanks.
hi
You can try adding this class to your Web project. Then you can custom the messages.
namespace MyCompanyName.MyProjectName.Web;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(DefaultExceptionToErrorInfoConverter), typeof(IExceptionToErrorInfoConverter))]
public class MyDefaultExceptionToErrorInfoConverter : DefaultExceptionToErrorInfoConverter
{
public MyDefaultExceptionToErrorInfoConverter(
IOptions<AbpExceptionLocalizationOptions> localizationOptions,
IStringLocalizerFactory stringLocalizerFactory,
IStringLocalizer<AbpExceptionHandlingResource> stringLocalizer,
IServiceProvider serviceProvider)
: base(localizationOptions, stringLocalizerFactory, stringLocalizer, serviceProvider)
{
}
protected override RemoteServiceErrorInfo CreateErrorInfoWithoutCode(Exception exception, AbpExceptionHandlingOptions options)
{
var errorInfo = base.CreateErrorInfoWithoutCode(exception, options);
if (errorInfo.Code == "Forbidden" &&
errorInfo.Message == "Forbidden" &&
errorInfo.Details == "The user represented by the token is not allowed to perform the requested action.")
{
errorInfo.Code = "Your New Code Here";
errorInfo.Message = "Your New Message Here";
errorInfo.Details = "Your New Details Here";
}
return errorInfo;
}
}
hi
Your logs come from the AuthServer project. Do you also have an API website that uses JWT Bearer authentication?
Can you share the API and web projects logs?
Thanks.
ok, I will try it.
Thanks.
hi
Can you share the project info?
App or Tiered and UI type? I will try to reproduce it.
I will provide a solution to localize the error message once it is reproduced.
Thanks.
hi
It should be POST, Can you debug the OnPostAsync method of GatewaySelectionModel?
Thanks.