Add more error handling

This commit is contained in:
Junior 2023-06-05 23:03:15 -03:00
parent 7917f223e1
commit 8cf88ab0e4
5 changed files with 33 additions and 12 deletions

View file

@ -17,7 +17,7 @@ namespace RHLauncher
try
{
using HttpClient client = new();
HttpResponseMessage response = await client.GetAsync(LauncherVersionUrl);
using HttpResponseMessage response = await client.GetAsync(LauncherVersionUrl);
response.EnsureSuccessStatusCode();
string json = await response.Content.ReadAsStringAsync();
dynamic result = JsonConvert.DeserializeObject(json);