It is a naive misunderstanding that the purpose of science is to predict the future. This is not the case, see Science does NOT predict the future.
So, orthodox economics can be accused of many things but incorrect prognoses are not its worst defect. The lethal defect is that orthodox economics is materially and formally inconsistent, i.e., entirely outside of science.
What makes science special is that it figures out laws or, in a more general term, invariants. A popular example is E=mc2. Obviously, this law does not predict the future. Neither does the Law of the Lever. Laws simply hold ALWAYS ― past, present, future. See The Synthesis of Economic Law, Evolution, and History.
What economists can indeed be accused of is that they have failed at their PRIMARY task and not figured out the laws that govern the actual market system. See The general theory of scientific incompetence.
Some economists excuse their failure to explain how the economy works by asserting that there is no such thing as an economic law. See A heap of proto-scientific garbage.
These economic law deniers are political economists (in contradistinction to theoretical economists) who defend their natural habitat, that is, the intellectual swamp where “nothing is clear and everything is possible” (Keynes). Political economists are unable/ unwilling to leave the scientific no man’s land between true and false and to proceed from opinion to knowledge. See From Orthodoxy to Heterodoxy to Sysdoxy.
In political economics, to know nothing is not a declaration of scientific bankruptcy but the very premise of the Laissez-faire philosophy. Just because we know nothing we better leave all to the invisible hand a.k.a. the market. Who knows nothing cannot do anything. Thus, naturally given ignorance implies the futility of economic policy. This has been Hayek’s core message. In the Hayekian world, knowledge is hubris, and science is denounced as scientism. In political economics, the arbitrariness and inevitable failure of prognoses is taken as indirect proof that Laissez-faire is the best policy. In Laissez-faire philosophy there is no need for scientific knowledge of how the system works. Because of this, political economics is not merely unscientific but anti-scientific.
Since the founding fathers, who identified themselves as political economists, the role of the economist has NOT been to produce provable scientific knowledge but to produce rhetorically effective opinion in the outer form of science. It is no accident that economic debates always end without a clear-cut true/false conclusion and that the four failed research programs Walrasianism, Keynesianism, Marxianism, and Austrianism coexist in the status quo of proven false theories and entire lack of scientific knowledge, see The Profit Theory is False Since Adam Smith.
Ambivalence, ignorance, and inconclusiveness are the original sin in science but a virtue in politics. Because of this, economists have always been quite comfortable with the running gag that they have forecast nine of the last five recessions or that they never saw a crisis coming. These forecasting mishaps do not count as a refutation of the underlying theory. After all, you know folks, ALL forecasts are a matter of luck and ALL models are false. In political economics, there is no truth and therefore no refutation, only the pluralism of false theories and false prophesy.
Economic forecasting is Circus Maximus and here scientifically failed economists are not entirely useless for the entertainment of the crowd.