Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Sources/DataConnectError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,15 @@
-> DataConnectOperationError {
return DataConnectOperationError(message: message, cause: cause, response: response)
}

// include the underlying errors from errorInfo list in the description
public var debugDescription: String {
let errorInfos = response?.errors.compactMap {
$0.message
}.joined(separator: "\n")

return "{\(Self.self), \nerrors: \(errorInfos) \noriginatingError: \(String(describing: underlyingError))}"

Check warning on line 227 in Sources/DataConnectError.swift

View workflow job for this annotation

GitHub Actions / spm (macos-15, iOS, Xcode_16.2)

string interpolation produces a debug description for an optional value; did you mean to make this explicit?

Check warning on line 227 in Sources/DataConnectError.swift

View workflow job for this annotation

GitHub Actions / spm (macos-15, macOS, Xcode_16.2)

string interpolation produces a debug description for an optional value; did you mean to make this explicit?

Check warning on line 227 in Sources/DataConnectError.swift

View workflow job for this annotation

GitHub Actions / spm (macos-15, tvOS, Xcode_16.2)

string interpolation produces a debug description for an optional value; did you mean to make this explicit?

Check warning on line 227 in Sources/DataConnectError.swift

View workflow job for this annotation

GitHub Actions / spm (macos-15, catalyst, Xcode_16.2)

string interpolation produces a debug description for an optional value; did you mean to make this explicit?
}
}

/// Contains the data and errors sent to us from the backend in its response.
Expand Down
Loading