If you're giving flow of control to the API the response is to wait until hell freezes over, or the user presses ctrl-alt-del. If you're calling it asynchronously the typical strategy is to timeout.
If the API throws an exception, easy: clean up, log, and display the error.
Whatever you do, don't fail quietly. I hate debugging things that fail quietly.
If the API returns but hands you nothing, that is, null or nil, well that means whatever the API documented that to mean. Null is overloaded to mean many things. It is a gaping hole in the typing system. Sir Hoare called it his billion dollar mistake.
When you ask for something you are making a query, that is, asking a question. Every question has a premise. Something it assumes to be true. When that assumption is wrong we respond with something other than was expected. We may be in a system that assumes it can ask for the height of anything and find ourselves modeling a song. When asked the height of a song how can you respond? Make up some amplitude nonsense and stick it in a height object? We usually respond with an exception, an error code, a NaN, or in some sad cases, with a null. Each API will have already made this decision. Whatever they did, if it violates the expectations of the question just please, don't fail quietly. Give some idea what might be wrong. Even 404 is better than a blank page.