Throw error on legacy apis