Peel and finely chop the onion. Clean and wash the peppers and leek. Dice paprika, cut leek into rings. Peel garlic and chop finely. Cook spaghetti in boiling salted water for about 10 minutes. In the meantime heat oil in a large pan. Brown onion, bell pepper, garlic and leek in it, add thyme and stew at low heat for about 5 minutes.
Put a tablespoon of vegetables aside. Dust the rest of the vegetables with flour, sweat them and add tomatoes, stock and cream, stirring constantly. Bring to the boil and season with ketchup, salt, pepper, sugar and paprika. Cut ham into fine strips. Drain the pasta and quench. Arrange on a plate with sauce and ham and serve. Garnish with thyme as desired