Activities of "Todi"

Thank you

Can you please supply the sample code you used because I've followed the example above and the Default confirmation still displays even after { provide: HTTP_ERROR_HANDLER, useValue: handleHttpErrors },

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 confirmService = injector.get(ConfirmationService); const toaster = injector.get(ToasterService); toaster.error(httpError.error?.error?.message || 'Bad request!', '400'); confirmService.error('Overriding this thing' || 'Bad request!', '400');

return;

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

// return; // }

console.log(throwing error);

return throwError(httpError); }

Hi, thank you for the reply.

However the supplied solution does not solve my issue. Plase find image attached to show that the Confirmation Pop still shows

Thank you. I followed the thread. It doesn't really say how the issue was resolved in the end. Tried overriding StatusCodeErrorHandlerService, it does not get registered. Is it possible to supply an example to resolve this issue?

Showing 1 to 4 of 4 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on December 26, 2024, 06:07