CommandError
public enum CommandError : ErrorEnum, ErrorWrapping
Errors that can occur during remote command execution.
These errors represent validation failures and missing required parameters. All errors provide descriptive messages for centralized logging in dispatchers.
-
Required parameter is missing from payload.
Declaration
Swift
case missingParameter(String) -
Required parameter exists but has invalid type.
Declaration
Swift
case invalidParameterType(parameter: String, expectedType: String) -
Required parameter is empty when non-empty value expected.
Declaration
Swift
case emptyParameter(String)
-
Array parameter is empty when non-empty expected.
Declaration
Swift
case emptyArray(String) -
Multiple arrays have mismatched lengths.
Declaration
Swift
case arrayLengthMismatch(array1: String, count1: Int, array2: String, count2: Int)
-
No valid parameters found when at least one expected.
Declaration
Swift
case noValidParameters(expected: [String])
-
Command with the specified name was not found in registry.
Declaration
Swift
case commandNotFound(String)
-
A vendor-specific command error that doesn’t fit the generic cases above.
Declaration
Swift
case underlyingError(_: Error)
-
Detailed description of the error for logging purposes.
Declaration
Swift
public var message: String { get }
View on GitHub