#bradley-invoice-dotnet

1 messages · Page 1 of 1 (latest)

shy umbraBOT
novel iris
#

moving the message here for complete context

using the following
await service.GetAsync(invoiceItemId);
I get No such invoice: <invoiceItemId> where the variables are valid invoice Item IDs

shy umbraBOT
dense lichen
#

bradley-invoice-dotnet

errant nebula
#

let me check

#

I'm using the SDK to call the invoiceItemsService:
var service = new InvoiceItemService();

        var requestOptions = new RequestOptions()
        {
            ApiKey = credential.ApiKey.Value
        };
dense lichen
#

I mean you think you are but the error message is pretty clear that you are not. My guess is that this code is not what errors, you're confusing this code with something else.
Add clear logs before/after that code and you'll see you don't get there

errant nebula
#

req_OycQHA66NTuSIk

dense lichen
#

ah my bad, damn that error message is bad, I'll get it fixed this week, it's super confusing

errant nebula
#

Thanks! Is there something wrong?

dense lichen
#

where did you get that InvoiceItem id exactly?

errant nebula
dense lichen
#

okay can you tweak the code to add clear logs that outputs the ids of every InvoiceItem and clearly print it? I want to see what id you get before you get that error

errant nebula
#

sure, one sec

#

oh, so I am not passsing in the requestOptions which contain the API key here (var results = await service.GetAsync(invoiceItemId);) but I am in my unit test. That's what's causing the issue I think

dense lichen
#

ah gotcha

errant nebula
#

that was my bad

#

I'm sorry

dense lichen
#

totally fine 🙂