title: How do I handle errors in a shared observable in typescript?
body: <p>I have stumbled on a bit of an issue and have trouble finding a person with a similar issue, which probably indicates I am doing something that I shouldn't be doing..</p>
  <p>I am doing a http request that looks like this</p>
  <pre><code>return this.httpClient.post(`${this.route}/typegroups`, JSON.stringify(typeGroup)).pipe(share());
  </code></pre>
  <p>I am subscribing to the returning observable twice and wants both subscribers to be notified if an error occurs(and if everything went well of course).
  Right now it's only the first subscriber that gets the error notification</p>
  <p><strong>First subscriber:</strong></p>
  <pre><code>obs.subscribe((next:any) =&gt; {
    //Success Code
  },
  error =&gt; {
    this.notificationService.showError(error.message)
  })
  </code></pre>
  <p><strong>The second subscriber</strong></p>
  <pre><code>obs.subscribe(next =&gt; {
      console.log(&quot;EVERYTHING WENT WELL&quot;)
    },
    error =&gt; {
      console.log(&quot;ERROR&quot;)
    },
    () =&gt; console.log(&quot;COMPLETED&quot;));
  </code></pre>
  <p>The first subscriber is getting the error notification and the error method is executed, the other subscriber however is having the next method is executed. Which makes it think everything went ok.
  Any idea why this is happening?
  Perhaps there even is a better way of doing this?</p>
  <p>Thanks alot in advance, I'm currently racking my brains out tring to find a solution to this..</p>