-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
With an incomplete devtools impl like ours, we often have actors with unimplemented message types. According to the docs, we should send unrecognizedPacketType errors in these cases. It’s not clear how these errors are handled by the client or whether they’re handled well, but the client definitely has some logic for it.
We currently ignore unimplemented message types by not sending any reply, and returning ActorMessageStatus::Ignored (which just triggers a warning message). Since the devtools protocol is synchronous and ordered with respect to each actor, ignoring any message almost always permanently breaks that actor. Either the client is waiting for a reply before sending another request, so it will wait forever, or the client has sent another request, so the reply for that will go to the wrong request. This makes implementing features annoying, because the client may get stuck until we add a dummy handler for some other (maybe even unrelated) message.
Ideally our Actor::handle_message trait method should return the actual reply to be sent, or None if unimplemented. Then the caller can either send that message (if Some) or send an unrecognizedPacketType error (if None).
There are also missingParameter, badParameterType, and noSuchActor errors we can use.