Thanks to both you Sir’s. it was very helpful

On Thu, 11 Oct 2018 at 2:51 PM, Zlatko Đurić <zladu...@gmail.com> wrote:

> 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 angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Partha Majumdar
http://www.partha.majumdar.org

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to