DEV Community

Discussion on: Refactoring node.js (Part 1)

 
paulasantamaria profile image
Paula Santamaría • Edited

And that's why use cases matter. I won't expect a user to supply an incorrect id. In most use-cases they won't be writing the id themselves manually, that should be solved by the front-end. And that's why, in this particular case, I find an exception appropriate.