Hi Partha,
In addition to what Sander has said, you can be more specific in your error
interceptor on the Angular side. Something like this:
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<
HttpEvent<any>> { return next.handle(request) .catch(response => { if
(!response instanceof HttpErrorResponse) { // network error, ignore or
whatevs return throwError(response); } // we got an error from backend.
Options: // you can check e.g. request method if (response instanceof
HttpErrorResponse && request.method === 'PUT') { // show or not show the
dialog .. // alternatively check by your calling URL } else if
(request.url.contains('bulk-upload-endpoint') { // special handling here }
Or if it is just one endpoint that needs special handling, catch error
there on the call site and swallow it. Hope that gives you ideas.
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.