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
Serializing a ServiceException with a non-string object as the value of an Arg serializes the value of the arg as a JSON string instead of a proper JSON object (seems to happen in SerializableError.forException where the toString representation of the object is used, as opposed to the proper JSON object) - for example SafeArg.of("param", ImmutableList.of("arg1", "arg2"))
This is a problem since it's a mismatch between what the consumer of the exception expects (JSON object) and the actual JSON value (JSON string containing the toString representation of the object)
What did you want to happen?
Convert the safe-arg value to a proper JSON object, since that is what the consumer code expects.
The text was updated successfully, but these errors were encountered:
fmance
changed the title
Collection-based error arg values are serialized to strings
Non-string error arg values are serialized to strings
May 28, 2019
fmance
changed the title
Non-string error arg values are serialized to strings
Non-string error arg values are serialized to JSON strings instead of JSON objectsa
May 28, 2019
fmance
changed the title
Non-string error arg values are serialized to JSON strings instead of JSON objectsa
Non-string error arg values are serialized to JSON strings instead of JSON objects
May 28, 2019
What happened?
Serializing a
ServiceException
with a non-string object as the value of anArg
serializes the value of the arg as a JSON string instead of a proper JSON object (seems to happen inSerializableError.forException
where thetoString
representation of the object is used, as opposed to the proper JSON object) - for exampleSafeArg.of("param", ImmutableList.of("arg1", "arg2"))
This is a problem since it's a mismatch between what the consumer of the exception expects (JSON object) and the actual JSON value (JSON string containing the
toString
representation of the object)What did you want to happen?
Convert the safe-arg value to a proper JSON object, since that is what the consumer code expects.
The text was updated successfully, but these errors were encountered: