)]}'
{
  "commit": "3d2c81130ae18d46321d6851af9715d3312f6d6c",
  "tree": "32815c38a63f79943be5c09cf50a5c17c5dc8287",
  "parents": [
    "7c08f438078412382ed0a3ba447995a9efa54710"
  ],
  "author": {
    "name": "Ben Konyi",
    "email": "bkonyi@google.com",
    "time": "Tue Aug 18 20:09:55 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Aug 18 20:09:55 2026 +0000"
  },
  "message": "[flutter_tools] Handle all DartDevelopmentServiceExceptions gracefully in resident web runner (#191183)\n\n## Description\n\nThis PR ensures that `ResidentWebRunner` catches all variants of\n`DartDevelopmentServiceException` during startup, rather than just\n`failedToStartError`.\n\nWhen DDS fails to establish a WebSocket connection or upgrade the\nconnection to DWDS (e.g., if the target browser exits prematurely or\nrejects the handshake), `package:dds` throws\n`DartDevelopmentServiceException.connectionIssue(...)` with `errorCode \u003d\nDartDevelopmentServiceException.connectionError` (Code 3), rather than\n`failedToStartError` (Code 2).\n\nPreviously, `ResidentWebRunner` only caught `failedToStartError` and\nrethrew all other `DartDevelopmentServiceException`s, which caused the\nCLI to crash with an unhandled top-level exception.\n\nWith this change, we catch all `DartDevelopmentServiceException`s, log\nthe error details with stack trace, perform necessary cleanup, and\ngracefully exit via `throwToolExit(kExitMessage)`.\n\n## Related Issues\nFixes https://github.com/flutter/flutter/issues/191179\n\n## Tests\nAdded a new unit test in `resident_web_runner_test.dart`:\n- `Does not crash if DDS fails to upgrade WebSocket during startup`",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8f76a0842b7087d8d019f05b66c1cf87d462db4e",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/lib/src/isolated/resident_web_runner.dart",
      "new_id": "afd865d0ff99374f2c0a718e274f672625b6846c",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/lib/src/isolated/resident_web_runner.dart"
    },
    {
      "type": "modify",
      "old_id": "e9deba25ed7c1c9c8ce0d61d13f91de1e4c17341",
      "old_mode": 33188,
      "old_path": "packages/flutter_tools/test/general.shard/resident_web_runner_test.dart",
      "new_id": "5cada0e7f1779ef621ac4f0772ffae626bd829e3",
      "new_mode": 33188,
      "new_path": "packages/flutter_tools/test/general.shard/resident_web_runner_test.dart"
    }
  ]
}
