Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
1 vote
1 answer
96 views

I updated my Angular version from 15 to 16. The compiler did not give any errors, but the browser console displayed this error: core.module.ts imports: [ CommonModule, StoreModule.forRoot(...
JaNith RathNayaka's user avatar
1 vote
1 answer
103 views

I show an alert based on the http response returned in Angular. My code works in Get and post methods, but not in put and delete methods.I'm stuck here and would be very happy if someone could help me....
Kadir Ersezer's user avatar
0 votes
1 answer
91 views

Are there technologies or libraries capable of managing the refresh of an Angular app in case of typescript/javascript errors that can block the entire application? Is there a way to make the location....
Andy88's user avatar
  • 767
0 votes
1 answer
1k views

I'm using Angular HttpInterceptor to handle errors in my Http requests. If there is an error other than 401, I am displaying a popup modal that contains 2 buttons ('Close' to close the modal and '...
simon777's user avatar
0 votes
0 answers
61 views

I am trying to create a custom validator for an Angular reactive form that checks for the existence of a username in a Firestore database. The validator is working as expected and returning the ...
syahiruddin's user avatar
2 votes
2 answers
4k views

I had an error this is an error So I am learning how to catch errors with the catchError function in angular htttp services I have a ts file that executes function handler errors import { Injectable } ...
Sup's user avatar
  • 21
4 votes
1 answer
2k views

I found on the web that ErrorHandler can catch all errors as client-side errors and also httpErrorResponse errors. But in my situation, I can catch only client-side errors in GlobalErrorHandlerService,...
RobertcodeR's user avatar
0 votes
1 answer
390 views

In my project I'm using Angular 15. Inside I'm using two interceptors "HttpRequestInterceptor" and "ErrorInterceptor". The HttpRequestInterceptor deletes the error status code and ...
Иван's user avatar
0 votes
1 answer
1k views

I am facing this issue, I am searching a lot but nothing works. Please suggest to me, how to solve this. I have added this to the application module file. import {FormsModule} from '@angular/forms' ...
Suman's user avatar
  • 13
2 votes
1 answer
1k views

When I call setErrors for a textbox FormControl instance as shown in the images below, there should be an error message immediately but I don't see it until I remove the entire text. Here is my HTML ...
Jorge Zapata's user avatar
0 votes
1 answer
99 views

I was working on angular 2 previously and now upgraded the application to angular 12, the application is loading but only if the version 2 is compiled and loaded. It is compiling successfully , but ...
Munshat Nazeer's user avatar
0 votes
1 answer
346 views

I am trying to implement a general http handler error, but I found a strager behavior. My Error component only update the message error only after second click, but I dont know why. The code is ...
Glauco Todesco's user avatar
0 votes
1 answer
3k views

I'm trying to display an error, generated by the back-end, in the front-end developed in Angular material. I want that the error message is displayed into an alert window. My problem is that the error ...
user avatar
1 vote
1 answer
2k views

I use in angular the following global ErrorHandler: @Injectable() export class GlobalErrorHandler implements ErrorHandler { constructor(private errorService: ErrorService, private ...
Enis's user avatar
  • 95
1 vote
1 answer
1k views

I have a general Alert Dialog component that I use for various purposes throughout an Angular application (simplified)... @Component({ selector: 'app-alert-dialog', template: `<mat-dialog-...
Nickolas Hook's user avatar
2 votes
1 answer
1k views

I have a situation where I call an API to save data both manually and automatically, In the case of manual save I want to show the error if the save fails, and I achieved this using an angular global ...
Nil's user avatar
  • 195
1 vote
1 answer
847 views

After an error-response from the server my app does not send any further requests. I'm sending a request with: getMachineRules(rules: Array<string>): Observable<RulesResults> { return ...
nik_kobe's user avatar
-1 votes
2 answers
547 views

I have updated the angular app from v7.1 to v11, Updation was successful but after the update getting the below error. ERROR Error: ASSERTION ERROR: This TNode does not belong to this TView. [Expected=...
Umesh Naik's user avatar
1 vote
0 answers
7k views

I am using ToastrService to show notifications for server errors. But it does n't seems to be work. In the Ui if get request is not loading data to the tabular view due to a backed issue how to show ...
Hans's user avatar
  • 318
1 vote
1 answer
1k views

I am trying to handle server errors coming from my backend in my Angular project. I am using angular HTTP Interceptors. This is my interceptor service class @Injectable({ providedIn: 'root' }) ...
Mands's user avatar
  • 243
4 votes
2 answers
2k views

After trying more complex scenarios, without solution I return to basics: I have a web-api controller that when returning error 500, I would like the client to catch it. For some reason - this isn't ...
Guy E's user avatar
  • 1,957
2 votes
1 answer
2k views

I have a .net Core web-api application. I intentionally return an exception from the controller, but I don't see the exception being treated in the error treatment of the subscription. This is my code ...
Guy E's user avatar
  • 1,957
-2 votes
1 answer
55 views

problem ERROR Error: Uncaught (in promise): Error: Loading chunk dashboard.module failed. Error: Loading chunk dashboard.module failed. i would like use this import { Injectable, ErrorHandler } from &...
FranciscoReyes's user avatar
-3 votes
1 answer
162 views

I was facing the error can't GET / in Angular after implementing the Route.
a_l__o___k____'s user avatar
1 vote
2 answers
4k views

I'm trying to catch all console errors of my Angular aplication, not only the http response error, but also those that are generated in the application. I mean, All console errors, like this or like ...
Sergio Mendez's user avatar
1 vote
0 answers
183 views

I have a global error Interceptor which handles the error when server return error response. I have error interceptor to handle that. In my use case whenever an error occurs in angular app , consider ...
Mohamed Sahir's user avatar
2 votes
1 answer
3k views

Today I have decided to look more into some centralized error reporting for my Angular application. I used great article on Medium by Michael Karén (https://medium.com/angular-in-depth/expecting-the-...
Jiri Kralovec's user avatar
4 votes
0 answers
53 views

Related to my question here. and you can find the stackblitz here. I understand why the error shows up and it is indeed correct the fact that it is showing up. Although this is a non-production use ...
SebastianG's user avatar
  • 9,764
0 votes
1 answer
2k views

I am trying to use ngx-toastr in my global error handler, but it is giving me the following error. Error: Cannot instantiate cyclic dependency! ApplicationRef at throwCyclicDependencyError (core.js:...
Evil Tech's user avatar
  • 302
2 votes
0 answers
90 views

I would like to ask if there is any reason for using ErrorHandler and also HttpInterceptor when I want to show a specific error to end user? My question motivation is - I have a project with Angular ...
Jakub Jílek's user avatar
2 votes
1 answer
459 views

I would like to call my rest API in my custom error handler to email myself when the handler is called. I have tried to use the Injector, but I get this error: Error: Cannot instantiate cyclic ...
Leccho's user avatar
  • 666
0 votes
2 answers
374 views

error: No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document. at new PathLocationStrategy (common.js:453) at provideLocationStrategy (router....
sibani lenka's user avatar
0 votes
1 answer
793 views

Our current situation is as described, we have a huge angular application where a lot off API calls are fired in various components with error-handling so error will be displayed to the user with a ...
Nickolaus's user avatar
  • 4,871
0 votes
0 answers
146 views

I'm using Angular 7 and ngx-admin for a project. Also I'm using Sentry to log errors in a server. I have three level routes and the error occurs in the third level. When Sentry throws error the UI ...
Aji Ajiji's user avatar
0 votes
2 answers
69 views

How to manage error block in this situation - error managing in service and send to component Here storing data in BehaviorSubject in the first load and subscribing data from where I need. just ...
ShibinRagh's user avatar
  • 6,676
8 votes
2 answers
2k views

I have a global error handler defined as such (simplified/proprietary info scrubbed): export class ErrorsHandler extends CommonBase implements ErrorHandler { constructor(protected loggingService: ...
Kon's user avatar
  • 27.5k
4 votes
2 answers
12k views

Is there a way with the HttpClient to remove error messages from the browser console? My current code looks like this: getStuff(stuffId: string): Observable<Stuff[]> { return this....
Codehan25's user avatar
  • 3,042
0 votes
1 answer
2k views

I had a clarification on usage of intercepting ErrorHandler for handling custom error for HTTP requests and client side errors in Angular 6+. Its getting called correctly for client side errors. But ...
peterkr's user avatar
  • 421
1 vote
0 answers
491 views

I am using ErrorHandler interface in my angular5 project to show the error message and log error in console. The problem is I am getting Error: uncaught (in promise): Missing number at position 0 and ...
Anna's user avatar
  • 1,719
1 vote
1 answer
1k views

I'm using Angular 6. I have created a custom Error Handler extending ErrorHandler to handle all network errors like. import {ErrorHandler, Injectable, Injector} from '@angular/core'; import {...
Anuj TBE's user avatar
  • 9,922
0 votes
3 answers
4k views

Let's say I sent a post request to the server to create a user. If the server responds with an error, I want to get the body(form) I submitted(attached to that request) from the ErrorHandler. The ...
Alex Pappas's user avatar
  • 2,807
0 votes
0 answers
611 views

I am trying to use httpClient in Angular to make API calls. Here is my code where I am making the api call. This is my httpPost method in authService: this.authService.httpPost("/api/Users/...
helloworld's user avatar
  • 1,042
-1 votes
1 answer
921 views

I'm trying to display the backend error that I generate with my errorHandler, but it's not showing anything. How can I show it? it returns undefined HTML //This triggers the observable, if it has ...
Patricio Vargas's user avatar
0 votes
2 answers
230 views

//api.service.ts public Get(slug: string): Observable<T> { return this.http.get(`${environment.apiBaseURL}/${this.endPoint}/${slug}`).pipe( map(data => this.serializer.fromJson(...
Joe's user avatar
  • 834
0 votes
0 answers
2k views

As I tried to upload an image via API scripted in PHP, once after uploading succeded into the following directory getting HttpErrorResponse code with status: 200 upload-image.component.ts OnSubmit(...
Nɪsʜᴀɴᴛʜ ॐ's user avatar
3 votes
2 answers
8k views

How to handle navigation errors in ErrorHandler? I tried using the following condition to check whether Error object is of NavigationError but it says false. export class AppErrorHandler implements ...
Prajwal's user avatar
  • 4,048
0 votes
1 answer
230 views

I have a question about my Angular app, I have an app that gets its initial config data from an API and can bootstrap the app using those config. Here is the ApiConfigService: export class ...
AlreadyLost's user avatar
4 votes
1 answer
911 views

I've created global error handler in my Angular 6 application: main error handler method: handleError(error: Error | HttpErrorResponse) { const router = this.injector.get(Router); const ...
Salarenko's user avatar
  • 135
5 votes
1 answer
4k views

I have an application with an globalError handler like this: import { Injectable, ErrorHandler, Injector } from "@angular/core"; import { Router } from "@angular/router"; @Injectable() export class ...
Wald Specht's user avatar
2 votes
2 answers
1k views

While reading through the Error Handling in Angular 5, I came across 2 ways: 1. HttpInterceptor and 2. ErrorHandler. Is HttpInterceptor a better solution than ErrorHandler? Can you have both ...
rohit12sh's user avatar
  • 847