glib2: add error handler for unexpected case