{"action":"created","issue":{"url":"https://api.github.com/repos/Qeti/loopback-sdk-angular/issues/4","repository_url":"https://api.github.com/repos/Qeti/loopback-sdk-angular","labels_url":"https://api.github.com/repos/Qeti/loopback-sdk-angular/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Qeti/loopback-sdk-angular/issues/4/comments","events_url":"https://api.github.com/repos/Qeti/loopback-sdk-angular/issues/4/events","html_url":"https://github.com/Qeti/loopback-sdk-angular/pull/4","id":138323075,"number":4,"title":"no crash on failed login","user":{"login":"sylvaindumont","id":5496488,"avatar_url":"https://avatars.githubusercontent.com/u/5496488?v=3","gravatar_id":"","url":"https://api.github.com/users/sylvaindumont","html_url":"https://github.com/sylvaindumont","followers_url":"https://api.github.com/users/sylvaindumont/followers","following_url":"https://api.github.com/users/sylvaindumont/following{/other_user}","gists_url":"https://api.github.com/users/sylvaindumont/gists{/gist_id}","starred_url":"https://api.github.com/users/sylvaindumont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sylvaindumont/subscriptions","organizations_url":"https://api.github.com/users/sylvaindumont/orgs","repos_url":"https://api.github.com/users/sylvaindumont/repos","events_url":"https://api.github.com/users/sylvaindumont/events{/privacy}","received_events_url":"https://api.github.com/users/sylvaindumont/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-03T22:59:30Z","updated_at":"2016-03-10T21:38:33Z","closed_at":"2016-03-07T14:56:33Z","pull_request":{"url":"https://api.github.com/repos/Qeti/loopback-sdk-angular/pulls/4","html_url":"https://github.com/Qeti/loopback-sdk-angular/pull/4","diff_url":"https://github.com/Qeti/loopback-sdk-angular/pull/4.diff","patch_url":"https://github.com/Qeti/loopback-sdk-angular/pull/4.patch"},"body":"On a failed login, angular throw :\r\nEXCEPTION: [object Object]\r\n\r\nconsole.warn error instead"},"comment":{"url":"https://api.github.com/repos/Qeti/loopback-sdk-angular/issues/comments/195060384","html_url":"https://github.com/Qeti/loopback-sdk-angular/pull/4#issuecomment-195060384","issue_url":"https://api.github.com/repos/Qeti/loopback-sdk-angular/issues/4","id":195060384,"user":{"login":"mnvx","id":829880,"avatar_url":"https://avatars.githubusercontent.com/u/829880?v=3","gravatar_id":"","url":"https://api.github.com/users/mnvx","html_url":"https://github.com/mnvx","followers_url":"https://api.github.com/users/mnvx/followers","following_url":"https://api.github.com/users/mnvx/following{/other_user}","gists_url":"https://api.github.com/users/mnvx/gists{/gist_id}","starred_url":"https://api.github.com/users/mnvx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnvx/subscriptions","organizations_url":"https://api.github.com/users/mnvx/orgs","repos_url":"https://api.github.com/users/mnvx/repos","events_url":"https://api.github.com/users/mnvx/events{/privacy}","received_events_url":"https://api.github.com/users/mnvx/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T21:38:33Z","updated_at":"2016-03-10T21:38:33Z","body":"@phra, as I can see in [documentation](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/share.md), your method is nice. But I think what it is not necessary to use `first()`. I'm for example using next way\r\n\r\n```\r\n    this.userApi.login({\r\n      username: username,\r\n      password: password\r\n    })\r\n    .subscribe(\r\n      res => {\r\n        this.cantAuth = false;\r\n        this.router.parent.navigate(['Home']);\r\n      },\r\n      err => {\r\n        this.cantAuth = true;\r\n      }\r\n    );\r\n```\r\nAnd I think what it is good idea to look inside engine of Rx for 100% guarantie (I did not do it)."}}