You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The _routeRequest method in vm_service.dart has a bug where it catches and re-encodes RPCError exceptions as kServerError, losing the original error code and information.
This PR applies the following changes to the _routeRequest method:
- Preserves RPCError exceptions: When an RPCError is caught, it returns the error as-is using e.toMap(), maintaining the original error code and information.
- Wraps other exceptions: Only non-RPCError exceptions are wrapped as kServerError, which is the appropriate behavior for unexpected errors.
This ensures that when service callbacks throw specific RPCError instances (like kIsolateCannotReload), those error codes are properly propagated to the client instead of being incorrectly replaced with kServerError.
fixes: #61757
Change-Id: Ib67c78035215372d1cc2c73d8c819e2825aad5bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458040
Auto-Submit: Jessy Yameogo <[email protected]>
Reviewed-by: Nate Biggs <[email protected]>
Reviewed-by: Ben Konyi <[email protected]>
Commit-Queue: Ben Konyi <[email protected]>
0 commit comments