minus-squareprof@infosec.pubtoProgrammer Humor@lemmy.ml•Always follow 3-2-1 backup rulelinkfedilinkarrow-up1·6 months agoYeah, 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. linkfedilink
minus-squareprof@infosec.pubtoProgrammer Humor@lemmy.ml•Always follow 3-2-1 backup rulelinkfedilinkarrow-up0·6 months agoMeme is funny, but that exception used as flow control hurts. linkfedilink
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.