JS SDK run_query causing an error

Hello! I'm using the Looker JS SDK v4.0 inside an extension framework app. I'm trying to use the run_query method but it is failing. Here's what I'm doing:

try {

  const res = await core40SDK.ok(core40SDK.run_query(30731, "csv"));

  console.log(res);

} catch (error) {

  console.error(error);

}

And I'm getting the following error 

TypeError: Cannot read property 'toString' of undefined     at encodeParam (transport.js:115)    

at methods.js:2772    

at Generator.next (<anonymous>)    

at asyncGeneratorStep (methods.js:1)    

at _next (methods.js:3)    

at methods.js:3    

at new Promise (<anonymous>)    

at methods.js:3    

at Looker40SDK.run_query (methods.js:2787)    

at EmbedLook.js:71 

I already queried that queryId using Python and Looker API and I'm getting the correct data. I don't know if I'm missing something. Here's the docs link I'm using as a base https://docs.looker.com/reference/api-and-integration/api-reference/v3.1/query#run_query

Any help will be appreciated!

0 0 160