MingweiSamuel / Camille

C# Riot API Library. Thread safe, automatic retries, autogenerated nightly releases.
Other
102 stars 8 forks source link

System.ArgumentNullException when RiotAPI replies with 404 Data not found #33

Closed aPinat closed 4 years ago

aPinat commented 4 years ago

Hey, thanks for the quick fix on the nightly builds, works great!

Got another one for you, that seams to only happen quite recently... ex. summoner = SummonerV4().GetBySummonerNameAsync(REGION, "UNUSEDSUMNAME"); throws exception below instead of returning null to summoner

System.ArgumentNullException: 
  at at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options)
  at at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
  at at Camille.RiotApi.RiotApi.Send[T](Region region, String methodId, HttpRequestMessage request, Nullable`1 token, Boolean ignoreAppRateLimits)
MingweiSamuel commented 4 years ago

Thanks for this report as well. Next version will be live at: https://www.nuget.org/packages/Camille.Lcu/3.0.1-nightly-2020-02-13-02a2e1247c