I forgot that they can fail with errno = 0, which indicates that the given entry was not found.
And many other things, too many to list here. For example, it now properly logs uds instead of erroring out. Separating concerns in many places definitely improves the readability.