I first get all the PVP Leaderboards, then I add the appropriate characters. This works very well except for a single character of 3800. I logged this error and here is the result:
System.AggregateException: One or more errors occurred. ('D' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.)
---> System.Text.Json.JsonException: 'D' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: 'D' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
at System.Text.Json.Utf8JsonReader.Read()
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable`1 actualByteCount)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo jsonTypeInfo)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at ArgentPonyWarcraftClient.WarcraftClient.GetAsync[T](String requestUri, String accessToken)
at ArgentPonyWarcraftClient.WarcraftClient.GetAsync[T](String requestUri)
at ArgentPonyWarcraftClient.WarcraftClient.GetCharacterProfileSummaryAsync(String realmSlug, String characterName, String namespace, Region region, Locale locale)
at ArgentPonyWarcraftClient.WarcraftClient.GetCharacterProfileSummaryAsync(String realmSlug, String characterName, String namespace)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at WOW1.Models.Datenbank.Logiken.PVPLeaderBoardLogiken.ErgaenzeCharakter(List`1 pvpLeaderBoards) in C:\Users\danie\source\repos\WOW1\WOW1\Models\Datenbank\Logiken\PVPLeaderBoardLogiken.cs:line 52 Id from the Character is :166526222
The CharacterDatas: CharacterProfileSummary { Links = Links { Self = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx?namespace=profile-eu } }, Id = 161996209, Name = Goosebondxx, Gender = EnumType { Type = FEMALE, Name = Weiblich }, Faction = EnumType { Type = HORDE, Name = Horde }, Race = PlayableRaceReference { Key = Self { Href = https://eu.api.blizzard.com/data/wow/playable-race/2?namespace=static-10.0.2_46479-eu }, Name = Orc, Id = 2 }, CharacterClass = PlayableClassReference { Key = Self { Href = https://eu.api.blizzard.com/data/wow/playable-class/9?namespace=static-10.0.2_46479-eu }, Name = Hexenmeister, Id = 9 }, ActiveSpec = PlayableSpecializationReference { Key = Self { Href = https://eu.api.blizzard.com/data/wow/playable-specialization/266?namespace=static-10.0.2_46479-eu }, Name = Dämonologie, Id = 266 }, Realm = RealmReference { Key = Self { Href = https://eu.api.blizzard.com/data/wow/realm/506?namespace=dynamic-eu }, Name = Draenor, Id = 506, Slug = draenor }, Guild = GuildReference { Key = Self { Href = https://eu.api.blizzard.com/data/wow/guild/draenor/semper-solus?namespace=profile-eu }, Name = Semper Solus, Id = 63743537, Realm = RealmReference { Key = Self { Href = https://eu.api.blizzard.com/data/wow/realm/506?namespace=dynamic-eu }, Name = Draenor, Id = 506, Slug = draenor }, Faction = EnumType { Type = HORDE, Name = Horde } }, Level = 70, Experience = 0, AchievementPoints = 22165, Achievements = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/achievements?namespace=profile-eu }, Titles = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/titles?namespace=profile-eu }, PvpSummary = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/pvp-summary?namespace=profile-eu }, Encounters = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/encounters?namespace=profile-eu }, Media = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/character-media?namespace=profile-eu }, LastLoginTimestamp = 03.01.2023 18:40:21 +00:00, AverageItemLevel = 388, EquippedItemLevel = 375, Specializations = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/specializations?namespace=profile-eu }, Statistics = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/statistics?namespace=profile-eu }, MythicKeystoneProfile = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/mythic-keystone-profile?namespace=profile-eu }, Equipment = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/equipment?namespace=profile-eu }, Appearance = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/appearance?namespace=profile-eu }, Collections = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/collections?namespace=profile-eu }, ActiveTitle = , Reputations = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/reputations?namespace=profile-eu }, Quests = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/quests?namespace=profile-eu }, AchievementsStatistics = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/achievements/statistics?namespace=profile-eu }, Professions = Self { Href = https://eu.api.blizzard.com/profile/wow/character/draenor/goosebondxx/professions?namespace=profile-eu }, CovenantProgress = ArgentPonyWarcraftClient.CovenantProgress }