Jsforce: Error: Invalid URI "/services/data/v39.0/query

Created on 1 Mar 2018  路  3Comments  路  Source: jsforce/jsforce

Error: Invalid URI "/services/data/v39.0/query?q=SELECT%20Id%2C%20Name%20FROM%20Account" Not sure why this is occurring. accessToken? maybe?

  • console.log(conn.accessToken); (works fine)
  • console.log(conn.instanceUrl); (works fine)

conn.login returns the URI and the access token correctly. How can jsforce use this for executing a query?

Most helpful comment

Nevermind.. I found the issue. My query was outside of conn.login.

All 3 comments

Nevermind.. I found the issue. My query was outside of conn.login.

Hi @MarkBolden , I am getting a similar error from my request and I'm using a signed request in my POST call:

conn = new jsforce.Connection({signedRequest: sr}); conn.sobject('Account').create({ "Name":"Acc-001" }, (err, val)=>{ if(err){ res.send(There are errors >>> ${err}); } else { res.send(There is a success >>> ${val}); } });

This is just a test route I used to debug, and can see: Error: Invalid URI "/services/data/v42.0/sobjects/Account" in every call to this route. Any pointers?

Thanks!

Hi @MarkBolden , I am getting a similar error from my request and I'm using a signed request in my POST call:

conn = new jsforce.Connection({signedRequest: sr}); conn.sobject('Account').create({ "Name":"Acc-001" }, (err, val)=>{ if(err){ res.send(There are errors >>> ${err}); } else { res.send(There is a success >>> ${val}); } });

This is just a test route I used to debug, and can see: Error: Invalid URI "/services/data/v42.0/sobjects/Account" in every call to this route. Any pointers?

Thanks!

The login is asynchronous. You can to wait until the log in process is complete before you make the query.

I use await and then call a function to indicate readiness only once the login process is complete.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akatechis picture akatechis  路  4Comments

jbonigomes picture jbonigomes  路  3Comments

zestyphresh picture zestyphresh  路  7Comments

stomita picture stomita  路  5Comments

JonDum picture JonDum  路  7Comments