Käyttäjän "Todi" toiminnot

  • ABP Framework version: v8.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi guys, following the example on the link, but the error popups is displayed after my code gets executed. Added return to suppress the popup, as shown in the example, but the popup still shows.

https://docs.abp.io/en/abp/latest/UI/Angular/HTTP-Requests#http-error-handling

export function handleHttpErrors(injector: Injector, httpError: HttpErrorResponse) {

if (httpError.status === 400) { const toaster = injector.get(ToasterService); toaster.error(httpError.error?.error?.message || 'Bad request!', '400');

return;

}

if (httpError.status === 500) { const toaster = injector.get(ToasterService); alert(Handling error); toaster.error(httpError.error?.error?.message || 'Bad request!', '400');

return;// Added return to suppress the popup

} // if (httpError.status === 404) { // const contentProjection = injector.get(ContentProjectionService); // contentProjection.projectContent(PROJECTION_STRATEGY.AppendComponentToBody(Error404Component));

// return; // }

console.log(throwing error);

return throwError(httpError); }

Näytetään 1 - 1/1 tietueesta
Made with ❤️ on ABP v8.2.0-preview Updated on maaliskuuta 25, 2024, 15.11