The Help Center has a nice section titled "When should I edit posts?". It comes with a couple of helpful editing suggestions.
What is not made clear in there however is when/what you shouldn't edit. I would propose a small addition to the help center, primarily motivated by some of the comments made here:
Is there anything I shouldn't edit?
When it comes to questions, don't change the code. Minor code formatting and indentation corrections are often acceptable, but for indentation sensitive languages such as Python, even such edits are best not made. Correcting what you think are typos or irrelevant mistakes might well change the entire question or confuse the author.
Editing code in answers follows roughly similar guidelines, though the correction of an obvious typo is often acceptable. If your edit is substantial however, it is often wise to leave a comment for the author explaining the flaw and requesting the correction.
Of course the wording is merely a proposal and I would be open to other suggestions and improvements.
I think such a clarification would be good information to have for suggested edits, and it would perhaps prevent some of the "Why was my edit rejected?" questions we see here on Meta. (One can only hope). Particularly so when the information tells you to "correct minor mistakes".