Skip to content

Commit

Permalink
[bazel] Fix .NET compiler errors
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Apr 18, 2024
1 parent fa57e9c commit 0608c63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dotnet/src/webdriver/Response.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,24 +158,24 @@ public static Response FromErrorJson(string value)

if (!deserializedResponse.TryGetValue("value", out var valueObject))
{
throw new WebDriverException($"The 'value' property was not found in the response:{Environment.NewLine}{value}");
throw new WebDriverException($"The 'value' property was not found in the response:{System.Environment.NewLine}{value}");
}

if (valueObject is not Dictionary<string, object> valueDictionary)
{
throw new WebDriverException($"The 'value' property is not a dictionary of <string, object>{Environment.NewLine}{value}");
throw new WebDriverException($"The 'value' property is not a dictionary of <string, object>{System.Environment.NewLine}{value}");
}

response.Value = valueDictionary;

if (!valueDictionary.TryGetValue("error", out var errorObject))
{
throw new WebDriverException($"The 'value > error' property was not found in the response:{Environment.NewLine}{value}");
throw new WebDriverException($"The 'value > error' property was not found in the response:{System.Environment.NewLine}{value}");
}

if (errorObject is not string)
{
throw new WebDriverException($"The 'value > error' property is not a string{Environment.NewLine}{value}");
throw new WebDriverException($"The 'value > error' property is not a string{System.Environment.NewLine}{value}");
}

response.Status = WebDriverError.ResultFromError(errorObject.ToString());
Expand Down

0 comments on commit 0608c63

Please sign in to comment.