Получаване на SystemFault при запитване за елемент

Използвайки V3, когато се опитвам да направя заявка за артикули, получавам обща грешка с тип SystemFault.

Опитвам се да изпълня Select * From Item Where Name = 'Something'

Това работи в API Explorer и смятам, че пресъздавам HTTP заявката точно.

My HTTP GET is:

GET /v3/company/redacted/query?query=Select%20*%20From%20Item%20Where%20Name%20=%20'Something'%20STARTPOSITION%201%20MAXRESULTS%2020 HTTP/1.1
Accept  application/xml
Accept-Encoding gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Authorization   OAuth oauth_consumer_key="redacted", oauth_nonce="redacted", oauth_signature="redacted", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1386704546", oauth_token="redacted", oauth_version="1.0"
Host    qb.sbfinance.intuit.com

И отговорът, който получавам:

<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2013-12-10T11:42:03.147-08:00">
    <Fault type="SystemFault">
        <Error code="10000">
            <Message>An application error has occurred while processing your request</Message>
            <Detail>System Failure Error: Unexpected Internal Error. (-30000)</Detail>
        </Error>
    </Fault>
</IntuitResponse>

Пропускам ли нещо очевидно? Благодаря ти.


person Cody Caughlan    schedule 10.12.2013    source източник


Отговори (1)


Не е очевидно, но от документацията, намерена тук, изглежда, че вие трябва да кодира ' и =, присъстващи във вашата заявка.

Така че вместо:

/v3/company/redacted/query?query=Select%20*%20From%20Item%20Where%20Name%20=%20'Something'%20STARTPOSITION%201%20MAXRESULTS%2020

Трябва да използвате

/v3/company/redacted/query?query=Select%20*%20From%20Item%20Where%20Name%20%3D%20%27Something%27%20START POSITION%201%20MAXRESULTS%2020

Кодиране ' към %27 и = към %3D.

person Bruno Buccolo    schedule 10.12.2013