He-Pin opened a new pull request, #3166: URL: https://github.com/apache/pekko/pull/3166
### Motivation `EndpointReader` only caught `NotSerializableException` and `IllegalArgumentException` during non-reliable message dispatch, allowing other `NonFatal` exceptions (e.g. `ClassNotFoundException`, `RuntimeException` from custom serializers) to escape and kill the endpoint. The reliable delivery path (`deliverAndAck`) had no exception protection at all. Additionally, `EndpointWriter` error logs showed the outer wrapper class instead of the actual message type for wrapped messages. ### Modification - `EndpointReader`: widen catch to `NonFatal` for both non-reliable dispatch and `deliverAndAck` paths - `EndpointWriter`: use `WrappedMessage.unwrap()` to log the inner message class in oversized payload and serialization error messages - Change `logTransientSerializationError` parameter from `Exception` to `Throwable` - Update log message from "Serializer not defined" to "Could not deserialize" to cover all failure scenarios ### Result All `NonFatal` deserialization errors are handled as transient (connection stays alive) on both reliable and non-reliable delivery paths. Error logs now show the actual message type for wrapped messages, improving debuggability. ### Tests - `sbt "remote / Test / testOnly org.apache.pekko.remote.TransientSerializationErrorSpec"` — added `RuntimeOnDeserialize` test case to verify `RuntimeException` is caught and connection stays alive ### References Fixes #3163 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
