Add basic handling for certificate errors