intuit / intuit/oauth-jsclient
Can't send "query" request - 400 error (SELECT * FROM ... WHERE DisplayName LIKE ...)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 145
- Forks
- 167
- PR merge metrics
- No merged PRs in 30d
Description
I have the following query:
const selectStatement = `SELECT * FROM Customer WHERE DisplayName LIKE '%MFM 58%'`; // does NOT work!
// const selectStatement = 'SELECT * FROM Customer'; // works just fine! :)
const resp = await oauthClient.makeApiCall({
url: `https://sandbox-quickbooks.api.intuit.com/v3/company/${realmId}/query?query=${selectStatement}&minorversion=65`,
method: 'GET'
});
This does NOT work!
I always get a 400 Bad Request - but everything is just fine! NO problems with the auth, because the following selectStatement works just fine: selectStatement = 'SELECT * FROM Customer' ... so what gives? I don't see what is wrong with my call!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at oauthClient.makeApiCall and reproduce the two query URLs shown in the issue, comparing the working SELECT request with the LIKE request. Inspect the resulting request and 400 response to determine where the two forms diverge; done means the LIKE query has a confirmed cause and a verified resolution or clear explanation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100