code: def show_error_dialog(self, message, details=None):
          
          dlg = Gtk.MessageDialog(type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK,
                                   message_format=message)
          if details is not None:
              dlg.format_secondary_text(details)
          dlg.run()
          dlg.destroy()
docs: Convenience method for showing an error dialog.