if field's type already implements json.Unmarshaler do nothing
The reason for this PR, because the use of logrus.WithError is popular and if the error type doesn't implement json.Unmarshaler, the value won't be sent to sentry server.
Coverage increased (+1.4%) to 50.0% when pulling aadc900253e44d5afd4a6f2d77f4a6f8e41ca73e on favadi:format-extra-data into d265708c9c877d2f458e673f0af437a0529baee9 on evalphobia:master.
Coverage increased (+6.2%) to 54.787% when pulling b4a7be867fc74cc131c62a9561c672211b35c198 on favadi:format-extra-data into d265708c9c877d2f458e673f0af437a0529baee9 on evalphobia:master.
convert to string if a field type is:
if field's type already implements json.Unmarshaler do nothing
The reason for this PR, because the use of
logrus.WithError
is popular and if the error type doesn't implement json.Unmarshaler, the value won't be sent to sentry server.