Herodotus recounts a story of Croesus asking the Athenian lawgiver Solon about happiness. Croesus who was quite wealth and at ease appeared to be a “happy man.” So Croesus hoping to flatter himself asked Solon who was the happiest man in the world. When Solon did not say Croesus, Croesus asked for the second; again, not Croesus. This irritated Croesus: how can I not be the happiest man in the world. Solon explained that happiness cannot be known until we know the end of the story:
So, Croesus, man is entirely chance.  To me you seem to be very rich and to be king of many people, but I cannot answer your question before I learn that you ended your life well.
Solon then explains how the matter of chance interacts with the matter of wealth: wealth perhaps soften some blows of chance, but it cannot alone make one happy:
The very rich man is not more fortunate than the man who has only his daily needs, unless he chances to end his life with all well. Many very rich men are unfortunate, many of moderate means are lucky.
The man who is very rich but unfortunate surpasses the lucky man in only two ways, while the lucky surpasses the rich but unfortunate in many. The rich man is more capable of fulfilling his appetites and of bearing a great disaster that falls upon him, and it is in these ways that he surpasses the other. The lucky man is not so able to support disaster or appetite as is the rich man, but his luck keeps these things away from him, and he is free from deformity and disease, has no experience of evils, and has fine children and good looks.
And we cannot know how much wealth will matter, because even wealth cannot guarantee all things necessary.
If besides all this he ends his life well, then he is the one whom you seek, the one worthy to be called fortunate. But refrain from calling him fortunate before he dies; call him lucky. It is impossible for one who is only human to obtain all these things at the same time, just as no land is self-sufficient in what it produces. Each country has one thing but lacks another; whichever has the most is the best. Just so no human being is self-sufficient; each person has one thing but lacks another.
And so, it is only at death that we learn whether one is happy:
Whoever passes through life with the most and then dies agreeably is the one who, in my opinion, O King, deserves to bear this name. It is necessary to see how the end of every affair turns out, for the god promises fortune to many people and then utterly ruins them.
Then Croesus was to learn the tale himself:
By saying this, Solon did not at all please Croesus, who sent him away without regard for him, but thinking him a great fool, because he ignored the present good and told him to look to the end of every affair. But after Solon’s departure divine retribution fell heavily on Croesus; as I guess, because he supposed himself to be blessed beyond all other men.
The Greek here is more explicit than Godley’s translation. It reads, “ μετὰ δὲ Σόλωνα οἰχόμενον ἔλαβέ ἐκ θεοῦ νέμεσις μεγάλη Κροῖσοv.” After Solon departed, Croesus received from God great Nemesis. Nemesis is the retribution due. She is the goddess who brings downfall to the proud.
And so Croesus learned in his own life that Solon was corrected: wealth cannot guarantee happiness.