Skip to content
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

RemoveMembersFromGroup api call fails when returned ids too big for int32 #48

Open
aqez opened this issue Dec 6, 2019 · 1 comment
Open

Comments

@aqez
Copy link

aqez commented Dec 6, 2019

RemoveMembersFromGroup needs to return List instead of List in EmmaSharp\Groups.cs
public List<int> RemoveMembersFromGroup(string memberGroupId, MemberIdList memberIds)
should be..
public List<long> RemoveMembersFromGroup(string memberGroupId, MemberIdList memberIds)

Below is stack trace from a live call that is failing for me.

Newtonsoft.Json.JsonReaderException: JSON integer 2169469051 is too large or small for an Int32. Path '[0]', line 2, position 12.
   at Newtonsoft.Json.JsonTextReader.ParseReadNumber(ReadType readType, Char firstChar, Int32 initialPosition)
   at Newtonsoft.Json.JsonTextReader.ReadNumberValue(ReadType readType)
   at Newtonsoft.Json.JsonTextReader.ReadAsInt32()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at EmmaSharp.EmmaApi.Execute[T](RestRequest request, Int32 start, Int32 end)
   at EmmaSharp.EmmaApi.RemoveMembersFromGroup(String memberGroupId, MemberIdList memberIds)
@timuism
Copy link

timuism commented May 26, 2022

I am having a similar issue with getting an individual Mailing.

I am using ListMailings() and then doing Select() to transform the list to include the WebviewUrl, but I get a similar error:

JSON integer 265285948 is too large or small for an Int32. Path 'links[0].link_id', line 10, position 27.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants