Options

First POST Success, Error on Subsequent Calls

dpydpy Member Posts: 2

Hello,

I used List Invoices by Customer from the examples: https://developer.waveapps.com/hc/en-us/articles/360055748912-Query-List-invoices-by-customer

First POST= yields response body with invoices associated with customer ID [success]
Subsequent calls with identical data (unchanged query/method/variables) = the NOT_FOUND error listed below [fail]

I have tried this with multiple customer IDs (Node.ID), and the result is the same. The customer is retrieved the first time, but any call thereafter is considered NOT_FOUND. I have not tried retrieving the customer through any other Query.

Through the List Contacts query I was able to affirm that the customers still exist and that their IDs (Node.ID) are identical to those being provided in the List Invoices by Customer request body.

Error body:

{'errors': [{'extensions': {'code': 'NOT_FOUND', 'id': 'f5f24e72-0351-4516-b586-24d56068318d'}, 'message': "Customer '('CUSTOMER_ID',)' could not be found.", 'locations': [{'line': 5, 'column': 13}], 'path': ['business', 'invoices']}], 'data': {'business': {'id': BUSINESS_ID, 'isClassicInvoicing': False, 'invoices': None}}}

Where CUSTOMER_ID and BUSINESS_ID are strings associated with our profile of length 84 and 60 characters respectively.

Many thanks for any assitance,

D

P.s. Python 3.8, using requests module

Tagged:

Comments

  • Options
    dacklanddackland Member, Administrator, Moderator Posts: 25 admin

    Hi @dpy ,

    This does sound strange! Fortunately, I've verified that this query does return successfully when run multiple times from GraphQL Playground. Would you be able to verify that running the query from our Playground also works for you? You'll need to login to a Wave account before using Playground since it requires an active session.

    In theory, that query should work repeatedly unless you run into a rate limit, which clearly isn't the case from your error output. If you are able to successfully run the query from Playground repeatedly, then I'd double-check if the query variables are in fact identical on subsequent requests.

  • Options
    dpydpy Member Posts: 2

    Thanks @dackland !

    The query also worked multiple times this morning when run from the Playground.

    I re-ran the code this morning with absolutely no changes and the error has vanished. :)

    Customers that were unretrievable after the first POST have magically come back into the fold and now are not only FOUND but can be called repeatedly without error.

    Given that I just began using the API yesterday and that the issue lasted for less than 24 hrs, my guess is that it has something to do with how Wave handles new Applications or new Full Access tokens.

    edited January 29, 2022
Sign In or Register to comment.