fix(fe): handle JSON-stringified fields from backend in message deserialization
Backend returns metadata, ai_moderation_flags, and ai_categories as raw JSON strings (PostgreSQL JSONB cast to string). Frontend expected parsed structs/arrays, causing serde to fail silently — entire PageResult parse failed and user saw empty message list with no error indicator. Add custom deserialize_with handler (from_json_string_or_value) that transparently handles null / direct value / JSON-string cases for the three affected fields.
This commit is contained in:
Generated
+1
@@ -1883,6 +1883,7 @@ name = "shared-types"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in New Issue
Block a user