If you are ever working with code in Drupal and encounter the typical message, "The website encountered an unexpected error. Please try again later," it’s a sign that there’s a bug. However, there’s no way to know exactly where it occurred, and it's tedious to go back and forth trying to find it manually. Drupal has an error level manager to help display errors.
The following tip is a trick developers can use to make the most obvious errors visible.
All you have to do is copy the following code.
And paste it into the "settings.php" file of your Drupal installation.