Skip to content

Commit

Permalink
release 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaBs committed Jul 7, 2022
1 parent c546d31 commit 9cd5363
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MojangAPI/MojangAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Description>.NET Library for Mojang API, Mojang Authentication and Microsoft Xbox Authentication</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/AlphaBs/MojangAPI</RepositoryUrl>
<Version>1.1.0</Version>
<Version>1.2.0</Version>
<PackageTags>mojang minecraft api</PackageTags>
</PropertyGroup>

Expand Down
8 changes: 4 additions & 4 deletions MojangAPI/MojangException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 9cd5363

Please sign in to comment.