Activities of "utku.birkan"

  • ABP Framework version: v8.0.5

  • UI Type: None

  • Database System: None

  • Tiered (for MVC) or Auth Server Separated (for Angular): N/A

  • Steps to reproduce the issue:

Hi, I'm writing a microservice to connect our ABP application with a legacy windows API. I have a console application that should import the said windows DLLs, and receive instructions on what to execute through the distributed event bus. I added AbpAbpEventBusRabbitMqModule into the dependency list of my application's module class. I can connect to a rabbitmq instance and push events, however event handlers do not receive anything.

Here's how I bootstrap the application. For the monitor loop, task queue and worker implementations I followed this Microsoft tutorial to keep things simple. I use ABP interfaces to register dependencies but didn't change all that much else.

using Siemens.PSSX.Bridge.Worker;
using ZLogger;

var builder = Host.CreateApplicationBuilder(args);

builder.Logging.ClearProviders().AddZLoggerConsole().AddZLoggerFile("Logs/logs.txt");
builder.Services.AddHostedService<Worker>();

await builder.Services.AddApplicationAsync<ApplicationModule>();

var host = builder.Build();

MonitorLoop monitorLoop = host.Services.GetRequiredService<MonitorLoop>()!;
monitorLoop.StartMonitorLoop();

await host.InitializeAsync();
await host.RunAsync();

Hi, I am trying to implement a custom 403 HTTP error page using Angular by providing an HTTP_ERROR_HANDLER function similar to the one described in the documentation. My implementation is given below.

// http-error-handler.ts
export function handleHttpErrors(injector: Injector, httpError: HttpErrorResponse) {
  if (httpError.status === 403) {
    const router = injector.get(Router);
    router.navigateByUrl('/unauthorized');
    return;
  }

  return throwError(httpError);
}

// app.module.ts
@NgModule({
  ...,
  providers: [
    ...,
    {
      provide: HTTP_ERROR_HANDLER,
      useValue: handleHttpErrors,
    },
  ]
})
export class AppModule {}

Before providing this error, UserFriendlyExceptions on the server side were handled via popups in the frontend. Now, each UserFriendlyException is captured by handleHttpErrors function as an HttpErrorResponse with status 403. We want to retain the previous 403 page behavior while using our new layout for actual, permission related 403 errors.

Relevant info:

  • ABP Framework version: v5.3.x
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
Showing 1 to 2 of 2 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11