Catch exceptions from the platform threads (a bit of a hack)
Generate a new cert before making an HTTPS request