getByIdOrThrow
The `getByIdOrThrow` function is a common utility in programming, particularly in frameworks and libraries dealing with data retrieval. Its primary purpose is to fetch an object from a data source, such as a database or an in-memory collection, using its unique identifier. If the object with the specified ID is found, it is returned.
However, the distinctive feature of `getByIdOrThrow` lies in its behavior when the object is *not* found. Instead
This approach is useful for enforcing data integrity and preventing potential `null` pointer exceptions or `undefined`