Have you ever seen a page with “There has been an error processing your request” when using Magento 1 or Magento 2? If no, you are lucky. This page is usually displayed when an issue appears in a system execution flow. Magento processes such issues by creating a separate report file in the var/report directory and by showing the error page with the details. You can also see a similar page “Service Temporarily Unavailable” when the maintenance mode has been enabled. Did you know that you can easily customize these error pages?
If you look inside of your Magento system.log from time to time, you will notice an error there like the following one:
2011-01-12T14:16:52+00:00 DEBUG (7): HEADERS ALREADY SENT: Call stack is here..
As you may already know, it can take a lot of time to find the place where the issues like this one appeared. So, let’s investigate why it happens and what we can do to speed up the bug fixing process.