DRY & KISS Principles

How does this API request implementation violate the DRY principle in a React application?
function UserComponent() {
  const fetchUser = async (id) => {
    try {
      const response = await fetch(`/api/users/${id}`);
      if (!response.ok) throw new Error('Failed to fetch user');
      return await response.json();
    } catch (error) {
      console.error('Error fetching user:', error);
      throw error;
    }
  };
}

function ProductComponent() {
  const fetchProduct = async (id) => {
    try {
      const response = await fetch(`/api/products/${id}`);
      if (!response.ok) throw new Error('Failed to fetch product');
      return await response.json();
    } catch (error) {
      console.error('Error fetching product:', error);
      throw error;
    }
  };
}
Next Question (7/20)