Skip to content

Commit b560945

Browse files
committed
JsonException
1 parent e9fce05 commit b560945

File tree

1 file changed

+3
-3
lines changed
  • dotnet/src/webdriver/BiDi/Communication

1 file changed

+3
-3
lines changed

dotnet/src/webdriver/BiDi/Communication/Broker.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ private void ProcessReceivedMessage(byte[]? data)
375375
switch (type)
376376
{
377377
case "success":
378-
if (id is null) throw new BiDiException("The remote end responded with 'success' message type, but missed required 'id' property.");
378+
if (id is null) throw new JsonException("The remote end responded with 'success' message type, but missed required 'id' property.");
379379

380380
var successCommand = _pendingCommands[id.Value];
381381
var messageSuccess = JsonSerializer.Deserialize(ref resultReader, successCommand.Item1.ResultType, _jsonSerializerContext)!;
@@ -384,7 +384,7 @@ private void ProcessReceivedMessage(byte[]? data)
384384
break;
385385

386386
case "event":
387-
if (method is null) throw new BiDiException("The remote end responded with 'event' message type, but missed required 'method' property.");
387+
if (method is null) throw new JsonException("The remote end responded with 'event' message type, but missed required 'method' property.");
388388

389389
var eventType = _eventTypesMap[method];
390390

@@ -395,7 +395,7 @@ private void ProcessReceivedMessage(byte[]? data)
395395
break;
396396

397397
case "error":
398-
if (id is null) throw new BiDiException("The remote end responded with 'error' message type, but missed required 'id' property.");
398+
if (id is null) throw new JsonException("The remote end responded with 'error' message type, but missed required 'id' property.");
399399

400400
var messageError = new MessageError(id.Value) { Error = error, Message = message };
401401
var errorCommand = _pendingCommands[messageError.Id];

0 commit comments

Comments
 (0)