Raise meaningful errors when accessing invalid relations