Skip to content

Commit 0e717a9

Browse files
Convert vars to lets
1 parent cd2cc5a commit 0e717a9

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

Sources/DataConnectError.swift

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ public struct DataConnectInitError: DataConnectDomainError {
9595

9696
public let code: Code
9797

98-
public private(set) var message: String?
98+
public let message: String?
9999

100-
public private(set) var cause: Error?
100+
public let cause: Error?
101101

102102
private init(code: Code, message: String? = nil, cause: Error? = nil) {
103103
self.code = code
@@ -146,9 +146,9 @@ public struct DataConnectCodecError: DataConnectDomainError {
146146

147147
public let code: Code
148148

149-
public var message: String?
149+
public let message: String?
150150

151-
public var cause: (any Error)?
151+
public let cause: (any Error)?
152152

153153
private init(code: Code, message: String? = nil, cause: Error? = nil) {
154154
self.code = code
@@ -183,12 +183,13 @@ public struct DataConnectCodecError: DataConnectDomainError {
183183

184184
/// Data Connect Operation Failed
185185
public struct DataConnectOperationError: DataConnectError {
186-
public var message: String?
187-
public var cause: (any Error)?
188-
public private(set) var response: OperationFailureResponse? = nil
186+
public let message: String?
187+
public let cause: (any Error)?
188+
public let response: OperationFailureResponse?
189189

190-
private init(message: String? = nil, cause: Error? = nil, response: OperationFailureResponse?) {
190+
private init(message: String? = nil, cause: Error? = nil, response: OperationFailureResponse? = nil) {
191191
self.response = response
192+
self.cause = cause
192193
self.message = message
193194
}
194195

@@ -206,12 +207,12 @@ public struct OperationFailureResponse: Sendable {
206207
// JSON string whose value is the "data" property provided by the backend in
207208
// its response payload; may be `nil` if the "data" property was not provided
208209
// in the backend response and/or was `null` in the backend response.
209-
public private(set) var rawJsonData: String?
210+
public let rawJsonData: String?
210211

211212
// The list of errors in the "error" property provided by the backend in
212213
// its response payload; may be empty if the "errors" property was not
213214
// provided in the backend response and/or was an empty list in the backend response.
214-
public private(set) var errors: [ErrorInfo]
215+
public let errors: [ErrorInfo]
215216

216217
// (Partially) decoded data
217218
private let data: Sendable?

0 commit comments

Comments
 (0)