Assuming you are working with a reliable recipe, if something goes wrong with a cake, the first thing to consider is the ingredients—the way in which they were weighed or measured and their temperature. Keep in mind that any substitution of ingredients is almost sure to have an impact on the way the cake turns out. Next is oven temperature. Another consideration is altitude.