Digital PCT265 defect CXTDT-531317 - Updated error messaging

This commit is contained in:
Hedden, Kyle Matthew 2024-04-25 16:01:55 -04:00
parent a428d5f7ce
commit 09ff3b6457

View File

@ -211,7 +211,7 @@ public struct ModelRegistry {
public static func getCodingKey<T>(for type: T.Type) throws -> AnyCodingKey {
guard let category = getCategory(for: type) else {
throw ModelRegistry.Error.decoderOther(message: "decodeModelsIfPresent only works for objects implementing the ModelProtocol protocol")
throw ModelRegistry.Error.decoderOther(message: "Category hasnt been registered for the CodingKey for this type: \(String(describing: type.self))")
}
return AnyCodingKey(category.codingKey)