Skip to content

Commit

Permalink
Fixes binding spec compliance for ErrorResponse
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Evans <[email protected]>
  • Loading branch information
jordan-mace authored and jimevans committed Mar 17, 2020
1 parent c543c22 commit f683dd2
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions dotnet/src/webdriver/Remote/ErrorResponse.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <copyright file="ErrorResponse.cs" company="WebDriver Committers">
// <copyright file="ErrorResponse.cs" company="WebDriver Committers">
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
Expand Down Expand Up @@ -68,9 +68,19 @@ public ErrorResponse(Dictionary<string, object> responseValue)
this.className = responseValue["class"].ToString();
}

if (responseValue.ContainsKey("stackTrace"))
if (responseValue.ContainsKey("stackTrace") || responseValue.ContainsKey("stacktrace"))
{
object[] stackTraceArray = responseValue["stackTrace"] as object[];
object[] stackTraceArray = null;

if (responseValue.ContainsKey("stackTrace"))
{
stackTraceArray = responseValue["stackTrace"] as object[];
}
else if (responseValue.ContainsKey("stacktrace"))
{
stackTraceArray = responseValue["stacktrace"] as object[];
}

if (stackTraceArray != null)
{
List<StackTraceElement> stackTraceList = new List<StackTraceElement>();
Expand Down

0 comments on commit f683dd2

Please sign in to comment.