logic: raise NotFound for missing schemas, add tests