@Kyrax80 wrote:
Hello guys, I have the following code:
getVideos(): Observable<CategoriaVideoExplicativo[]> { return new Observable(observer => { this.http.get<CategoriaVideoExplicativo[]>("http://" + "localhost:8080"+ "/PortalPacienteRSHQ/api/v1/videos/get/0") .subscribe(categorias => { ... observer.next(...); observer.complete(); }); }) }
With this kind of code how can I handle the error that could occur in
this.http.get<CategoriaVideoExplicativo[]>...
from where I call this method?
I’ve tried various combinations and none of them worked.Thanks
Posts: 1
Participants: 1