Throw the correct errors when content exists or cannot be foudn