using System.Text.Json.Nodes;
public static void Main()
var client = new RestClient("https://testapi.jasonwatmore.com");
var request = new RestRequest("invalid-url");
var response = client.ExecuteGet(request);
if (!response.IsSuccessful)
Console.WriteLine($"ERROR: {response.ErrorException?.Message}");
var data = JsonSerializer.Deserialize<JsonNode>(response.Content!)!;