The seizure of the US embassy in Tehran and the prolonged hostage crisis is the most common example cited by people as a foreign policy failure. The perception that his efforts to deal with the crisis were ineffectual and in particular the failed hostage rescue mission added to the perception of weakness and failure.
To be fair, President Carter also had several important foreign policy accomplishments, including two of historic proportions.
First, the 1978 Israel-Egypt peace agreement was almost entirely the result of Carter's personal efforts. This was widely considered impossible but it has now lasted more than 40 years and also served as the model for the similar agreement with Israel and Jordan.
Second, perhaps an even greater personal accomplishment is the Panama Canal treaty. Foreign policy experts considered it impossible to reach such and agreement and political observers "knew for a fact" that there was no chance of getting any treaty that "gave away the canal" to Panama through the US Senate. But that was accomplished. It is hard to over-state the importance of this treaty; the instability and ill will (throughout the region)that would have been promoted had we not made this agreement would have been incalculable. And the main concern (that Panama would not run the canal smoothly and continue to maintain an modernize it, or might deny us access) proved unfounded.
Carter also initiated many activities that Reagan continued and expanded, which are more associated with Reagan in the public mind. For example, Carter's CIA initiated the program to arm the mujahadeen in Afghanistan, which led to the Soviet pullout and played a significant role in the collapse of the Soviet Union. This could be regarded as the first time the US departed from the longstanding policy of containment and took action to actually roll back the Soviet empire.
Also in response to the Soviet invasion of Afghanistan, Carter organized the worldwide boycott of the 1980 Olympic games in Moscow (which was a huge blow to Soviet prestige).
He also began the arms buildup of the late 1970s, which Reagan greatly expanded, and negotiated the SALT II treaty, though he withdrew it from consideration after the invasion of Afghanistan.
Whether these triumphs outweigh the Iran catastrophe is for others to judge. But there is no doubt that Carter had significant accomplishments in the foreign policy arena, including two that any other US president would be proud to have on his or her record.