You added a new constructor argument to an existing action controller class.
When you reload the page you get a PHP error that the wrong argument is passed to the class.
How do you fix this?
A . Clean the page cache
B . Deploy static content
C . Clean the <magento_root>/generated/ folder
D . Clean the config cache
Answer: C
Explanation:
https://magento.stackexchange.com/questions/78826/creating-custom-module-in-magento2-show-fatal-error