Hi we are using codeble in our Api management layer, we are trying to set up models with codables and decodables,
in one case we have Error in our response model, how can we handle that
here is the sample code
struct Address : Codable {
var street: String
var zip: String
var city: String
var error: Error
private enum CodingKeys : String, CodingKey {
case street, zip = "zip_code", city, state
}
}
we are getting below error
Cannot automatically synthesize 'Encodable' because 'Error' does not conform to 'Encodable'
How can we handle error type in codables ?