Fool's Errand Meaning

(idiomatic) Such an undertaking, assigned as a prank.

Example: 1821, Sir Walter Scott, Kenilworth, ch. 1,
  If I were to travel only that I might be discontented with that which I can get at home, methinks I should go but on a fool's errand.
1988, Michael S. Serrill, "Diplomacy To Dream the Impossible Dream," Time, 7 Mar.,
  Shultz took little notice of the Soviet view or that of others who said his Middle East mission was a fool's errand. "You can't be too afraid of failing," said the 67-year-old diplomat.