Skip to content

System.AggregateException #10

@ghost

Description

Hi

Updated to latest nuget, and trying to do this code:

     ```
        var httpClient = new HttpClient { BaseAddress = ScryfallApiClientConfig.GetDefault().ScryfallApiBaseAddress };
        var scryfallApiClient = new ScryfallApiClient(httpClient);

        Card randomCard = scryfallApiClient.Cards.GetRandom().Result;

This GetRandom() worked in the previous nuget, now I get this error when calling GetRandom():

System.AggregateException
  HResult=0x80131500
  Message=Er zijn één of meer fouten opgetreden.
  Source=mscorlib
  StackTrace:
   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 Magic_The_Gathering_Collector.RandomCardForm.DisplayRandomCard() in F:\Visual Studio project\Magic The Gathering Collector\Magic The Gathering Collector\RandomCardForm.cs:line 41
   at Magic_The_Gathering_Collector.RandomCardForm..ctor() in F:\Visual Studio project\Magic The Gathering Collector\Magic The Gathering Collector\RandomCardForm.cs:line 33
   at Magic_The_Gathering_Collector.MainForm..ctor() in F:\Visual Studio project\Magic The Gathering Collector\Magic The Gathering Collector\MainForm.cs:line 76
   at Magic_The_Gathering_Collector.Program.Main() in F:\Visual Studio project\Magic The Gathering Collector\Magic The Gathering Collector\Program.cs:line 19

  This exception was originally thrown at this call stack:
    System.Number.StringToNumber(string, System.Globalization.NumberStyles, ref System.Number.NumberBuffer, System.Globalization.NumberFormatInfo, bool)
    System.Number.ParseDecimal(string, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo)
    ScryfallApi.Client.DecimalAsStringConverter.Read(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions)
    System.Text.Json.Serialization.JsonConverter<T>.TryRead(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions, ref System.Text.Json.ReadStack, out T)
    System.Text.Json.JsonPropertyInfo<T>.ReadJsonAndSetMember(object, ref System.Text.Json.ReadStack, ref System.Text.Json.Utf8JsonReader)
    System.Text.Json.Serialization.Converters.ObjectDefaultConverter<T>.OnTryRead(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions, ref System.Text.Json.ReadStack, out T)
    System.Text.Json.Serialization.JsonConverter<T>.TryRead(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions, ref System.Text.Json.ReadStack, out T)
    System.Text.Json.JsonPropertyInfo<T>.ReadJsonAndSetMember(object, ref System.Text.Json.ReadStack, ref System.Text.Json.Utf8JsonReader)
    System.Text.Json.Serialization.Converters.ObjectDefaultConverter<T>.OnTryRead(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions, ref System.Text.Json.ReadStack, out T)
    System.Text.Json.Serialization.JsonConverter<T>.TryRead(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions, ref System.Text.Json.ReadStack, out T)
    ...
    [Call Stack Truncated]

Inner Exception 1:
FormatException: De indeling van de invoertekenreeks is onjuist.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions