Meme is funny, but that exception used as flow control hurts.
Still hurts, but sometimes it’s the only option.
If you’re trying to confirm things like account existence/deletion, there’s often no “account exists” function to return true or false. You just have to figure out the specific exception thrown and catch that specific one.
The worst are libraries that don’t give specific exceptions, so you have to catch all exceptions then do extra work to tell what the specific situation is. Does the account not exist, or is the system unreachable?
Yeah, I had a similar case with some authentication middleware I used that was part of a library.
It would always throw an exception when a user wasn’t authenticated instead of just giving me some flag I could check.
Wouldn’t have done it that way, but it was okay for an API controller.
Holy fuck whoever was in charge of setting up that disaster recovery needs a million dollar bonus. I get that they’re managing $80B and this should all be standard but people usually don’t listen to IT and take DR seriously. And even if you do set it up, are you going back to check that your backups are functioning properly and have alarms for when it messes up