Skip to content

Commit

Permalink
[dotnet] [cdp] Reveal original exception message even if error code
Browse files Browse the repository at this point in the history
… is missing in payload

Fix #14483
  • Loading branch information
nvborisenko committed Sep 24, 2024
1 parent 68149ed commit 419484d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dotnet/src/webdriver/DevTools/DevToolsSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains
LogTrace("Recieved Error Response {0}: {1} {2}", modified.CommandId, message, errorData);
throw new CommandResponseException(exceptionMessage)
{
Code = modified.Result["code"].GetValue<long>()
Code = modified.Result["code"]?.GetValue<long>() ?? -1
};
}

Expand Down

0 comments on commit 419484d

Please sign in to comment.