Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Wrapper libraries >

Chunked Encoding Intermittantly Breaking API Client

Started by David Hedges -   in Wrapper libraries

Hi there,

Since last week we've been getting the following errors in your UNSUPPORTED client API

The issues appear to be intermittent- appears like some of you servers are sending chunked encoding response, and some aren't. When your server sends chunked encoding, it obviously omits the content-length header causing the error below...

Our call stack:
CallTheXeroApi -> System.ArgumentNullException: Value cannot be null.
Parameter name: String
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at DevDefined.OAuth.Consumer.ConsumerResponse..ctor(HttpWebResponse webResponse, TimeSpan timeTaken)
at DevDefined.OAuth.Consumer.DefaultConsumerRequestRunne

Matthew seems to have fixed the client library bug here:
https://github.com/XeroAPI/XeroAPI.Net/commit/3946a195397870b81cb5ce55ad9b20dd9c679658

Just wondering why this behaviour is intermittent- is it just applied to some servers? Did it relate to this mornings server issues listed on your status page?

This is the same issue:
https://community.xero.com/developer/discussion/89107224/