Application Error on Heroku! Here is the Solution that worked for me …

We often encounter application error problems on Heroku after deploying. This is often frustrating because the API works local but the moment we deploy, it gives an error. There can be various reasons for this. Like improper error handling, syntax error, and much more.
But I want to emphasize a very peculiar error that I once had.
If you are a video person, you can watch this video on youtube as well. https://www.youtube.com/watch?v=cOYhWfh8Sc4
Okay, let’s get straight to the point. The folder name change is not being tracked by the commit in Heroku. As a result, even if we push the correct folder name after changing it the change won't reflect on the folders in our server.
The best way to debug is by using this command in the terminal inside your project.
heroku logs

Here, you can see what is the actual problem. In my case, it was the import failure due to different folder names of Controllers.
You can run bash inside Heroku using this command.
heroku run bash
Now, you can view the files & navigate using the bash commands like ls, cd

Here, I figured out my error by looking into the error and then correcting the names of the folders.
Then, everything worked like butter. Thanks for reading my story. Hope this solved your error.
See ya next time!
Cheers!