Computing stats, ListContributorsStats, will return an AcceptedError and a body that is a JSON object and not a JSON array. However, it seems this will try to decode it as a JSON array causing a serialization error.
Commit that caused the bug... this seems to be a breaking change as well; I guess it is now obvious that it is:
88eb4e9
My suggestion would be to internally type alias the []ContributorStats and add a ImmediateAcceptedErrorReturn interface that can be casted during the client.Do function. If it is castable to an ImmediateAcceptedErrorReturn, it will immediately return the AcceptedError and not try to unmarshal the body. This makes it completely backwards compatible. I'll see if I can get some time to do this myself! :)
Computing stats,
ListContributorsStats, will return anAcceptedErrorand a body that is aJSONobject and not aJSONarray. However, it seems this will try to decode it as aJSONarray causing a serialization error.Commit that caused the bug... this seems to be a breaking change as well; I guess it is now obvious that it is:
88eb4e9
My suggestion would be to internally type alias the
[]ContributorStatsand add aImmediateAcceptedErrorReturninterface that can be casted during theclient.Dofunction. If it is castable to anImmediateAcceptedErrorReturn, it will immediately return theAcceptedErrorand not try to unmarshal the body. This makes it completely backwards compatible. I'll see if I can get some time to do this myself! :)