XeroAPI / Xero-NetStandard

A wrapper of the Xero API in the .NetStandard 2.0 framework. Supports Accounting, Payroll AU/US, and Files
MIT License
127 stars 124 forks source link

Xero.NetStandard.OAuth2 9.1.0 CreateInvoiceAttachmentByFileNameAsync fails #542

Open DaithiBradley opened 2 months ago

DaithiBradley commented 2 months ago

SDK you're using (please complete the following information):

Describe the bug When attempting to update a file to an invoice in version 9.1 an exception is returned.

Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: T. Path '', line 0, position 0. at bool Newtonsoft.Json.JsonTextReader.ParseValue() at bool Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, bool hasConverter) at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, bool checkAdditionalContent) at object Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at object Newtonsoft.Json.JsonConvert.DeserializeObject(string value, Type type, JsonSerializerSettings settings) at T Newtonsoft.Json.JsonConvert.DeserializeObject<T>(string value, JsonSerializerSettings settings)

The response body from developer.xero.com for the API call shows:

The resource you're looking for cannot be found

When the package is downgraded from nuget package 9.1.0 to 8.1.0 the call works as expected with the same code.

Expected behavior An existing invoice has a file attached to it.

Screenshots None

Additional context Nil

github-actions[bot] commented 2 months ago

PETOSS-567

github-actions[bot] commented 2 months ago

Thanks for raising an issue, a ticket has been created to track your request