Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log full exception upon deserialization failure #5121

Conversation

Aaronontheweb
Copy link
Member

We weren't capturing the exception thrown during deserialization anymore, just logging the error message. A throwback from before Akka.NET v1.4 when only the ILoggingAdatper.Error method accepted Exception arguments

@@ -1500,7 +1500,7 @@ private bool WriteSend(EndpointManager.Send send)
{
_log.Error(
ex,
"Serializer not defined for message type [{0}]. Transient association error (association remains live)",
"Serialization failed for message [{0}]. Transient association error (association remains live)",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made this message less specific, since we don't necessarily know why an outbound write failed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(the inner exception should tell us)

_log.Warning(
"Serializer not defined for message with serializer id [{0}] and manifest [{1}]. " +
_log.Warning(error,
"Deserialization failed for message with serializer id [{0}] and manifest [{1}]. " +
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed in the Exception as a parameter and made it clear that this was a read-side failure, not a write-side failure

Copy link
Contributor

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb merged commit e5c0946 into akkadotnet:dev Jul 5, 2021
@Aaronontheweb Aaronontheweb deleted the remote/cleanup-serialization-exception branch July 5, 2021 22:28
This was referenced Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants