Skip to content

Commit 419484d

Browse files
committed
[dotnet] [cdp] Reveal original exception message even if error code is missing in payload
Fix #14483
1 parent 68149ed commit 419484d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dotnet/src/webdriver/DevTools/DevToolsSession.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains
301301
LogTrace("Recieved Error Response {0}: {1} {2}", modified.CommandId, message, errorData);
302302
throw new CommandResponseException(exceptionMessage)
303303
{
304-
Code = modified.Result["code"].GetValue<long>()
304+
Code = modified.Result["code"]?.GetValue<long>() ?? -1
305305
};
306306
}
307307

0 commit comments

Comments
 (0)