core: handle errors from module.