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
Hi guys, I've noticed that when we try to use the Sync API with the SyncronizationManager in the ContentfulPersistence library, the sync() method throws a JSON Decoding Error when we have a content type in the space with a Reference field that references content from another space.
The ContentfulPersistence version I'm using is 0.17.7
The exception message I'm having is
"Cannot initialize FieldType from invalid String value ResourceLink"
I did some investigation inside the library and found that this ResourceLink type is not supported by the decodable models:
public enum FieldType: String, Decodable {
/// An array of links or symbols
case array = "Array"
/// A link to an Asset
case asset = "Asset"
/// A boolean value, true or false
case boolean = "Boolean"
/// A date value with optional time component
case date = "Date"
/// A link to an Entry
case entry = "Entry"
/// A numeric integer value
case integer = "Integer"
/// A link to an Asset or Entry
case link = "Link"
/// A location value, consists of latitude and longitude
case location = "Location"
/// A floating point number value
case number = "Number"
/// A JSON object value
case object = "Object"
/// A short text string, can be part of an array
case symbol = "Symbol"
/// A longer text string
case text = "Text"
/// An unknown kind of value
case none = "None"
/// The rich text field type.
case richText = "RichText"
}
Is that the supposed behavior? I believe this kind of content could be just ignored instead of throwing exceptions and aborting the whole synchronization to persistence.
This is a sample of the response that the Sync API returns when called by the SyncronizationManager in the app with the 2 entries we have in the space where one of them contains the ResourceLink type:
Hi guys, I've noticed that when we try to use the Sync API with the
SyncronizationManager
in theContentfulPersistence
library, thesync()
method throws a JSON Decoding Error when we have a content type in the space with a Reference field that references content from another space.The
ContentfulPersistence
version I'm using is 0.17.7The exception message I'm having is
I did some investigation inside the library and found that this
ResourceLink
type is not supported by the decodable models:Is that the supposed behavior? I believe this kind of content could be just ignored instead of throwing exceptions and aborting the whole synchronization to persistence.
This is a sample of the response that the Sync API returns when called by the
SyncronizationManager
in the app with the 2 entries we have in the space where one of them contains theResourceLink
type:When I remove this entry from the space, the synchronization works normally.
The text was updated successfully, but these errors were encountered: