Skip to content

Commit 1c41f41

Browse files
Documentation fixes.
1 parent 0fc0b63 commit 1c41f41

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

Sources/DataConnectError.swift

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import Foundation
1717
// MARK: - Base Error Definitions
1818

1919
/// A type representing an error returned by the DataConnect service
20+
///
21+
/// - SeeAlso: ``DataConnectError`` for the base error type.
2022
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
2123
public protocol DataConnectError: Error, CustomDebugStringConvertible, CustomStringConvertible {
2224
var message: String? { get }
@@ -69,7 +71,13 @@ public protocol DataConnectErrorCode: CustomStringConvertible, Equatable, Sendab
6971

7072
// MARK: - Data Connect Initialization Errors
7173

72-
/// Error initializing Data Connect
74+
/// An error that occurs during the initialization of the Data Connect service.
75+
///
76+
/// This error can arise due to various reasons, such as missing configurations or
77+
/// issues with the underlying gRPC setup. It provides specific error codes
78+
/// to pinpoint the cause of the initialization failure.
79+
///
80+
/// - SeeAlso: ``DataConnectDomainError`` for the base error type.
7381
public struct DataConnectInitError: DataConnectDomainError {
7482
public struct Code: DataConnectErrorCode {
7583
private let code: String
@@ -110,7 +118,13 @@ public struct DataConnectInitError: DataConnectDomainError {
110118

111119
// MARK: - Data Codec Errors
112120

113-
/// Data Encoding / Decoding Error
121+
/// An error that occurs during the encoding or decoding of data within the Data Connect service.
122+
///
123+
/// This error can arise due to various reasons, such as invalid data formats,
124+
/// incorrect UUIDs, or issues with timestamp/date formats. It provides specific error codes
125+
/// to pinpoint the cause of the encoding/decoding failure.
126+
///
127+
/// - SeeAlso: ``DataConnectDomainError`` for the base error type.
114128
public struct DataConnectCodecError: DataConnectDomainError {
115129
public struct Code: DataConnectErrorCode {
116130
private let code: String
@@ -230,7 +244,7 @@ public struct OperationFailureResponse: Sendable {
230244
/// This function does _not_ do the decoding itself, but simply returns
231245
/// the decoded data, if any, that was decoded at the time of the
232246
/// operation's execution.
233-
func data<Data: Decodable>(asType: Data.Type = Data.self) -> Data? {
247+
public func data<Data: Decodable>(asType: Data.Type = Data.self) -> Data? {
234248
return data as? Data
235249
}
236250

0 commit comments

Comments
 (0)