-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xero.NetStandard.OAuth2 9.1.0 CreateInvoiceAttachmentByFileNameAsync fails #542
Comments
PETOSS-567 |
Thanks for raising an issue, a ticket has been created to track your request |
I can also reproduce this issue |
@DaithiBradley I've got a workaround you can use, likely due to having a space or other unescaped value in the URL path due to the If you're using a Suggested solution is for the SDK to encode this parameter using See https://developer.xero.com/documentation/api/accounting/attachments |
Found this is mentioned in #570 (linking these tickets) |
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
The text was updated successfully, but these errors were encountered: