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
Log & Throw needlessly pollutes the logs and adds no value over and above the exception. It should be down to the developer if they handle and log the exception.
There are potentially more incidents of this.
To Reproduce
Deserialise a bad payload to force an exception to be thrown. The following log is observed:
2022.04.21 19:17:27 SEVERE org.eclipse.yasson.internal.DeserializationContextImpl Thread[helidon-1,5,server]: Unable to deserialize property 'foo' because of: Error deserialize JSON value into type: int.
Expected behavior
Only the exceptions should be thrown and no log messages should be written.
System information:
OS: Linux
Java Version: 17
Yasson Version: 3.0.0-RC1
Additional context
Workaround is to selectively disable logging, but as this is often set to SEVERE then other messages may be missed.
The text was updated successfully, but these errors were encountered:
Describe the bug
Log and throw is generally considered an anti-pattern but there are multiple instances where this is happenening:
DeserializationContextImpl[L144-L147]
,SerializationContextImpl[L135-L138]
.Log & Throw needlessly pollutes the logs and adds no value over and above the exception. It should be down to the developer if they handle and log the exception.
There are potentially more incidents of this.
To Reproduce
Deserialise a bad payload to force an exception to be thrown. The following log is observed:
Expected behavior
Only the exceptions should be thrown and no log messages should be written.
System information:
Additional context
Workaround is to selectively disable logging, but as this is often set to
SEVERE
then other messages may be missed.The text was updated successfully, but these errors were encountered: