When I call the blockchain.info API, I an error. What can i do to solve this problem?
The API returns No free outputs to spend when there's no unspent output, you need to account for that case. You can do a simple check on the status code (200: OK, 500: Error).