From 08adcc5c8c441e3896c9d04caacbf64e819b7920 Mon Sep 17 00:00:00 2001 From: Masum ULU <49063256+masumulu28@users.noreply.github.com> Date: Wed, 24 Jan 2024 08:58:40 +0300 Subject: [PATCH] Update HTTP-Error-Handling.md --- docs/en/UI/Angular/HTTP-Error-Handling.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/en/UI/Angular/HTTP-Error-Handling.md b/docs/en/UI/Angular/HTTP-Error-Handling.md index 1b4de9c38a..e657f5c773 100644 --- a/docs/en/UI/Angular/HTTP-Error-Handling.md +++ b/docs/en/UI/Angular/HTTP-Error-Handling.md @@ -138,12 +138,11 @@ import { CUSTOM_HTTP_ERROR_HANDLER_PRIORITY } from "@abp/ng.theme.shared"; import { ToasterService } from "@abp/ng.theme.shared"; @Injectable({ providedIn: "root" }) -export class MyCustomErrorHandlerService - implements CustomHttpErrorHandlerService +export class MyCustomErrorHandlerService implements CustomHttpErrorHandlerService { // You can write any number here, ex: 9999 readonly priority = CUSTOM_HTTP_ERROR_HANDLER_PRIORITY.veryHigh; - private toaster = inject(ToasterService); + protected readonly toaster = inject(ToasterService); private error: HttpErrorResponse | undefined = undefined; // What kind of error should be handled by this service? You can decide it in this method. If error is suitable to your case then return true; otherwise return false. @@ -175,7 +174,11 @@ import { MyCustomErrorHandlerService } from './custom-error-handler.service'; // ... providers: [ // ... - { provide: CUSTOM_ERROR_HANDLERS, useExisting: MyCustomErrorHandlerService, multi: true } + { + provide: CUSTOM_ERROR_HANDLERS, + useExisting: MyCustomErrorHandlerService, + multi: true, + } ] }) export class AppModule {}