[daemon] use go conventients for error handling