I have a service, which sends a http get request to a uri. Here is my code:
@Injectable()
export class InstagramService {
constructor( private _http:Http ){
}
getGallery(username: string) : Observable<dataSet> {
return this._http.get("http://www.instagram.com/"+username+"/media/").map(res => res.json(),
(err)=>console.log("Error is:"+err) );
}
}
And sometimes i get a 404
exception, i need to handle this exception, and does not let it appear in my console. I thought (err)=>console.log("Error is:"+err)
could be helpful, but the error is still in the console.
I have seen this, but is there an easier way to handle this exception without costume exceptionhandler?