Digital PCT265 defect CXTDT-531317 - Throw error during decode when pageType is empty.
This commit is contained in:
parent
35088ae446
commit
e06788ca66
@ -79,6 +79,9 @@ import Foundation
|
||||
} else {
|
||||
pageType = try typeContainer.decode(String.self, forKey: .pageType)
|
||||
}
|
||||
if pageType.isEmpty {
|
||||
throw ModelRegistry.Error.decoderOther(message: "pageType cannot be an empty string!")
|
||||
}
|
||||
screenHeading = try typeContainer.decodeIfPresent(String.self, forKey: .screenHeading)
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
formRules = try typeContainer.decodeIfPresent([FormGroupRule].self, forKey: .formRules)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user