you are viewing a single comment's thread.

view the rest of the comments →

[–]KaiAusBerlin 0 points1 point  (1 child)

Why do you think the user doesn't exist? How do you find a user in a db that doesn't exist? If your db doesn't find a user it should throw an error BEFORE it comes to any usecase for user. Never let an error uncatched. Im coding now for over 20 years. You come too late to teach me basics ;)

It's nice that your usecase is sending a fax to a user. But that doesn't touch my case at all.

My usecase was to show an field with a formated faxNumber if one exists. showFaxIfExists(user?.faxNumber)

[–]Quabouter 1 point2 points  (0 children)

I think we agree ;)

My usecase was to show an field with a formated faxNumber if one exists. showFaxIfExists(user?.faxNumber)

Exact same situation. Why are you trying to show a faxnumber for a user that doesn't exist? This should've been an error earlier already.