Added error message to getTypeDefinitions