News for hackers. Stuff that matters.
Re:You’re better off using Exceptions by RHSeeger on Monday February 03, 2020 @12:08PM (#22226179)
>> If you expected the record to be found, the failure of finding it is an exception.

> This is not always the case. In fact, for query APIs I do not expect it at all.

And, in your case, "if you expected the record to be found" doesn't apply.

If I'm iterating over a list of names/id provided by the APi, and then calling the API for more information each one, then I would expect the record to be found... because the API just told me it exists. In that case, it not being found is an exceptional condition.

Re:You’re better off using Exceptions by Horusiath on Monday February 03, 2020 @12:45PM (#22226690)
Only if you're the only user of that API or these entities are eternal once created. In any application with multiple users it's a normal thing for system state to change between two API calls.