If the product key didn't generate then you should handle it somehow in your code. 99.99% of the time the reason a product key might not generate is because of an error somewhere in your code or your setup (for example, creating "required" custom license fields, and then not setting those required custom license fields when you generate the product keys).
And then you also have to handle for the 0.01% chance that something might happen on the internet that blocks your access to the LimeLM servers and/or we're down for maintenance (it's rare, but it happens).
You can choose to either does this manually, or log the error in your systems, and have your systems automatically retry at a time sometime in the near future (i.e. not a while() loop hammering the servers).
Short answer: handle it somehow. You can send the customer an email that says "your product key will be sent shortly". But you should absolutely notify yourself and your support team that the product key wasn't generated.