Pass error from the hook