Adding an ssl error handler