this post was submitted on 12 May 2024
518 points (96.9% liked)
Programmer Humor
32342 readers
1181 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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.