def handle_error(self, error, download_request):
        """
        Checks what error occured and looks for an appropriate solution.

        Args:
          error: Exception
            The error that has occured.
          download_request:
            The request which resulted in the error.
        """
        if hasattr(error, "errno") and error.errno == errno.EACCES:
            self.handle_certificate_problem(str(error))
        else:
            self.handle_general_download_error(str(error), download_request)