From 9cd5363efa000bc3a98c7e2598e37ef8b603323b Mon Sep 17 00:00:00 2001 From: AlphaBs Date: Thu, 7 Jul 2022 18:08:58 +0900 Subject: [PATCH] release 1.2.0 --- MojangAPI/MojangAPI.csproj | 2 +- MojangAPI/MojangException.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MojangAPI/MojangAPI.csproj b/MojangAPI/MojangAPI.csproj index ac16150..82964e4 100644 --- a/MojangAPI/MojangAPI.csproj +++ b/MojangAPI/MojangAPI.csproj @@ -8,7 +8,7 @@ .NET Library for Mojang API, Mojang Authentication and Microsoft Xbox Authentication MIT https://github.com/AlphaBs/MojangAPI - 1.1.0 + 1.2.0 mojang minecraft api diff --git a/MojangAPI/MojangException.cs b/MojangAPI/MojangException.cs index 3657856..34d1540 100644 --- a/MojangAPI/MojangException.cs +++ b/MojangAPI/MojangException.cs @@ -44,11 +44,11 @@ public static MojangException ParseFromResponse(string responseBody, int statusC string? error = null; string? errorMessage = null; - if (root.TryGetProperty("error", out var errorProp) - && errorProp.ValueKind == JsonValueKind.String) + if (root.TryGetProperty("error", out var errorProp) && + errorProp.ValueKind == JsonValueKind.String) error = errorProp.GetString(); - if (root.TryGetProperty("errorMessage", out var errorMessageProp) - && errorMessageProp.ValueKind == JsonValueKind.String) + if (root.TryGetProperty("errorMessage", out var errorMessageProp) && + errorMessageProp.ValueKind == JsonValueKind.String) errorMessage = errorMessageProp.GetString(); if (string.IsNullOrEmpty(error) && string.IsNullOrEmpty(errorMessage))