I'm facing a tricky problem regarding app crashes in production.
I built a web app using node.js and deployed it to Railway, and I haven't covered each edge case or each error that might occur.
In local development, if an error occurs and gets printed in the terminal, as a user I can still proceed and do any other task, I can navigate to other pages, sign in sign out, etc.
But in production, if an error occurs (same error or any other error) and gets printed in the terminal, the whole app crashes and the server goes down.
I get a nodemon app crashed message in the logs in production:
[nodemon] app crashed - waiting for file changes before starting...
Though the same exact error happens in local development but I can still proceed and use the app.
Why is the whole app crashing in production only?
Does that mean I have to cover every possible scenario otherwise the whole server goes down?