Despite its apparent simplicity, your part poses a lot of problems for SolidWorks if you just give it the two end sketches and the two guide curves of the lateral shape. When he proposes a result, the geometry presents anomalies, even when multiplying the number of guide curves. And I concede that the error messages are rather obscure.
On the other hand, by offering it 4 sections as profiles and the two lateral guide curves, the result seems to be in line with what is expected (subject to careful checking).