record.js: use glib's -1 error return