Implemented custom exception for missing metadata