def METHOD_NAME(self, result, error=False, **kwargs):
    if error and "message" in result:
        QtWidgets.QMessageBox.critical(self, "Save settings", "Error while saving settings: {}".format(result["message"]))