How to enable error in Magento 2

  • Go to your Magento2 root directory
  • Then, go inside folder pub/errors
  • There, you will see a file named local.xml.sample
  • Rename it to local.xml, i.e. remove the “.sample” from the name of that file.
  • Refresh Cache from your Magento Admin (System -> Tools -> Cache Management).