title: Cannot convert return expression of type '(AnyPublisher<DemoObject, Never>, APIError)' to return type 'AnyPublisher<DemoObject, APIError>'
body: <pre><code>func testData()-&gt;AnyPublisher&lt;DemoObject, APIError&gt; {
  
      var data = DummyData().decodeClaimDetails()!
      
      return (Just(data).eraseToAnyPublisher(),
              APIError.httpError(200))
      
  }
  </code></pre>
  <p>I got this error.
  Cannot convert return expression of type '(AnyPublisher&lt;DemoObject, Never&gt;, APIError)' to return type 'AnyPublisher&lt;DemoObject, APIError&gt;'</p>
  <p>How can I return a type that is AnyPublisher&lt;DemoObject, APIError&gt;?</p>