A possible way is a rail revolve
You use a profile as curve and use an external curve to do the rail.
Use the center as begin of axis and a perpendicular point to end your axis.
If you look at center of the Prf object, you will see there is a problem too.
You could use Rail/revolve too.
And if you want you can use only one profile for the entire model with a rail revolve if you join the entire rail.
I’m back – there are several issues with alignment, fit and orthogonality (along the x, y and z axes) to sort out between the profile and the rail before using the ‘Sweep’ function to create the shape.