def METHOD_NAME(self, message: str) -> None:
    """Callback for failed connection check. Displays an error message, then emits the
    check_complete signal (but not the connection available signal)."""
    # This must run on the main GUI thread
    if hasattr(self, "connection_check_message") and self.connection_check_message:
        self.connection_check_message.close()
    if NetworkManager.HAVE_QTNETWORK:
        QtWidgets.QMessageBox.critical(
            None, translate("AddonsInstaller", "Connection failed"), message
        )
    else:
        # pylint: disable=line-too-long
        QtWidgets.QMessageBox.critical(
            None,
            translate("AddonsInstaller", "Missing dependency"),
            translate(
                "AddonsInstaller",
                "Could not import QtNetwork -- see Report View for details. Addon Manager unavailable.",
            ),
        )
    self.check_complete.emit()