Тёмный
No video :(

HTTP Error Handling - Angular (Tutorial #19) 

Nisha Singla
Подписаться 32 тыс.
Просмотров 30 тыс.
50% 1

HTTP Error handling is one of those things no one really wants to deal with , well in angular its quite easy
Kindly share this video : • HTTP Error Handling - ...
Hello everyone my name is nisha singla and I am back with my next tutorial on Error handling
in angular
In our previous video we have learnt how to make a http call to get the resources from RESTFUl
API and over there we had consumed a FAKE online REST API to get users information
As of now everything is working fine because we did everything right but in real life projects
things are not as simple as we have right now. Things can go wrong as well. Suppose
the API which we are calling is not working the way we are expecting.
May be the server is down ,internet connection is not avaibale or the URL is not correct or the user permission is denied .
So there could be many reason that can lead to the failure of this HTTP CALL and in that case we dont want that my user will see something which is not clear to them.
So let's see how to deal with the errors during HTTP CALL and to show how error handling
will work we are intentionally making a call to a wrong URL so that we can get error
In angular whenever we work with OBservable there are so many operators that is used
to implement some specific functionality so here we have such one operator that catch
the error raised by HTTP CALL and that is catch operator
you need to import catch operator , Observable and throw from rxjs
import "rxjs/add/operators/catch";
import "rxjs/add/observable/throw";
import Observable from 'rxjs/Observable";
Now the error which we have catched in catch() that we need to capture in respective component where we are consuming this service. So in app.component.ts we have to call this :
In subscribe () method the first argument is the success callback and second is for handling error.
If you liked my channel , subscribe to it and like my videos. For any queries ask you question in comment section
Subscribe to my channel :
/ nishasingla
Watch complete playlist here:
• Introduction- Angular ...
Follow us on:
Facebook: / angularjs4beginners
LinkedIn: / nisha-singla-82407aa0
Website :
For more such latest videos, please subscribe to our channel and stay connected.
If you face any problem in HTTP Error Handling then leave a comment below and let me know. I'll be happy to assist you.

Опубликовано:

 

25 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 54   
@stareditz7960
@stareditz7960 Год назад
Your explanation is concise and easy to understand. Thankful to your efforts. Keep doing this great job...
@pratikmadekar5728
@pratikmadekar5728 Год назад
Thanks for sharing your knowledge. Your all angular videos are very helpful.
@sekharchiguruvada2880
@sekharchiguruvada2880 4 года назад
Hi Nisha... The way of your explanation is really superb. Can you please write a blogs on these videos it may very useful for users.
@NishaSingla
@NishaSingla 4 года назад
Thank you Sekhar
@user-mp3ic8db6i
@user-mp3ic8db6i 5 месяцев назад
love your explanation, thank yuo
@manishsoni7103
@manishsoni7103 8 месяцев назад
Hi Nisha, You explain every topic very well that are easy to understant. Thank you for that. Request you to please create video series on React.
@venkatanagaraju5766
@venkatanagaraju5766 2 года назад
hi Nisha, the way of your explanation is very good. can you make video for CRUD Operations.
@SaiKumar-xm9uo
@SaiKumar-xm9uo 4 года назад
Your Tutorials are very nice just like ur profilepic Tq very much nisha Pleae do many more videos like this 😊😊😊
@NishaSingla
@NishaSingla 4 года назад
thank you
@SaiKumar-xm9uo
@SaiKumar-xm9uo 4 года назад
@@NishaSingla can you please make videos on react js
@raghavendergoudkommula1079
@raghavendergoudkommula1079 4 года назад
Nice explanation tqs a lot I learned so much from this video
@akulaomkar6212
@akulaomkar6212 6 лет назад
hi nisha am following your tutorial am getting some issues while HTTP error handling i got this like Property 'catch' does not exist on type 'Observable'." and i import like import "rxjs/add/operator/catch"; import "rxjs/add/observable/throw"; import { Observable } from 'rxjs/Observable'; even am getting same error what shall i do nisha......
@VenkateshVenky-fo1rc
@VenkateshVenky-fo1rc 4 года назад
i am also getting same.plz me
@selvas5497
@selvas5497 6 лет назад
very good explanation
@lakshminarayanaakkipalli1022
@lakshminarayanaakkipalli1022 4 года назад
Hi mam your flow of telling is very understanding way. Will you please post about promises and authentication
@mdaslamknl
@mdaslamknl 5 лет назад
Excellent Job Keep it up
@nari1874
@nari1874 6 лет назад
Good
@NishaSingla
@NishaSingla 6 лет назад
Thanks
@muhammadnaveed7953
@muhammadnaveed7953 Год назад
Nice work 👍
@sulabhakumbhar1658
@sulabhakumbhar1658 4 года назад
hi Nisha, the way of your explanation is very good. Will you please upload video on custom error handling.
@NishaSingla
@NishaSingla 4 года назад
Thank you Sulabha
@IqbalAhmed-qk5ix
@IqbalAhmed-qk5ix 3 года назад
ur teaching style to good Awesome thank u so much
@NishaSingla
@NishaSingla 3 года назад
Thanks and welcome
@felipe0liveira274
@felipe0liveira274 6 лет назад
You've saved my life 😍
@adhivenkatesh3431
@adhivenkatesh3431 4 года назад
Madam your teaching videos are very nice and how to create custom error please create a video.
@NishaSingla
@NishaSingla 4 года назад
Thank you
@davidpalmer4980
@davidpalmer4980 4 года назад
BEST BEST BEST Video
@NishaSingla
@NishaSingla 4 года назад
Thank you
@kathiravanramaswamy8433
@kathiravanramaswamy8433 4 года назад
Hi Nisha, Everything working But I am getting Unknown Error at the end of my error message
@Kamlesh-Bobde
@Kamlesh-Bobde 5 лет назад
Very nice, thanks Can you plz make video on angular lifeCycle hooks...
@gabrielpereiramendes3463
@gabrielpereiramendes3463 4 года назад
#Excelent!
@anishps2449
@anishps2449 11 месяцев назад
one small doubt why import statements for observable is different from that of catch and throw ?
@babupalanisamy3794
@babupalanisamy3794 5 лет назад
super madam
@prashanthnaidu11
@prashanthnaidu11 Год назад
Ma'am can you make a video on " Karma " Testing in angular
@pavankumar.r3035
@pavankumar.r3035 6 лет назад
Hi Nisha , I am using Angular 6, Is your code is compactable with Angular 6. I am not able use catch() . In Document, they are refering to catchError. So what's the solution.
@nari1874
@nari1874 6 лет назад
Actually I want a video from loading message before http call. If possible please do it..
@ankitrai9643
@ankitrai9643 3 года назад
i have error cant read property length
@venkateshyadla9798
@venkateshyadla9798 6 лет назад
Hi nisha, i got this error "Property 'catch' does not exist on type 'Observable'." can you tell me how to fix
@NishaSingla
@NishaSingla 6 лет назад
Make sure you have imported catch operator from rxjs like this : import 'rxjs/add/operator/catch';
@venkateshyadla9798
@venkateshyadla9798 6 лет назад
i import it but still getting error
@NishaSingla
@NishaSingla 6 лет назад
please check the import carefully : import "rxjs/add/operator/catch"; import "rxjs/add/observable/throw"; import {Observable} from 'rxjs/Observable"
@venkateshyadla9798
@venkateshyadla9798 6 лет назад
thanks solved
@venkateshyadla9798
@venkateshyadla9798 6 лет назад
but i got this error Cannot read property 'length' of undefined at Object.eval [as updateDirectives] (AppComponent.html:4) at Object.debugUpdateDirectives [as updateDirectives] (core.js:10756) at checkAndUpdateView (core.js:10153)
@santhoshkumar-sf4bc
@santhoshkumar-sf4bc 4 года назад
Could you possible make Subtitles to videos
@imgopi
@imgopi 6 лет назад
Hi Nisha thanks for your tutorial, Can you please do a video on Angular Dialogs ( jQury Dailog ) Thanks
@nari1874
@nari1874 6 лет назад
Try to explain http loading message
@NishaSingla
@NishaSingla 6 лет назад
Loading message will display before http call will complete its execution. If http call get success it will display data otherwise error message
Далее
Routing - Angular (Tutorial #20)
17:09
Просмотров 41 тыс.
GraphQL vs REST: Which is Better for APIs?
7:31
Просмотров 196 тыс.
Angular Tutorial - 22 - HTTP Error Handling
5:26
Просмотров 357 тыс.
Senior Angular Developer Interview (theory)
41:57
Просмотров 17 тыс.
Route Parameters - Angular (Tutorial #21)
14:40
Просмотров 33 тыс.
What’s new in Angular v18
20:08
Просмотров 117 тыс.
ANGULAR : Global Error Handling using Interceptors
11:34