Skip to content

Commit 8e6c9d5

Browse files
committed
update error codes and message
1 parent d74d878 commit 8e6c9d5

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/FaceLiveness/Views/Liveness/FaceLivenessDetectionError.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,16 @@ public struct FaceLivenessDetectionError: Error, Equatable {
126126
recoverySuggestion: "Ensure the device time is correct and try again."
127127
)
128128

129-
public static let invalidCameraPositionSelected = FaceLivenessDetectionError(
130-
code: 18,
131-
message: "The camera position selected is incompatible with the liveness challenge type requested.",
132-
recoverySuggestion: "Please ensure the camera position is supported for the liveness challenge type requested."
133-
)
134-
135129
public static let cameraNotAvailable = FaceLivenessDetectionError(
136130
code: 18,
137131
message: "The camera is not available.",
138-
recoverySuggestion: "There might be a hardware issue."
132+
recoverySuggestion: "There might be a hardware issue or the selected camera is not available."
133+
)
134+
135+
public static let invalidCameraPositionSelected = FaceLivenessDetectionError(
136+
code: 19,
137+
message: "The camera position selected is incompatible with the liveness challenge type requested.",
138+
recoverySuggestion: "Please ensure the camera position is supported for the liveness challenge type requested."
139139
)
140140

141141
public static func == (lhs: FaceLivenessDetectionError, rhs: FaceLivenessDetectionError) -> Bool {

Sources/FaceLiveness/Views/Liveness/LivenessStateMachine.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ struct LivenessStateMachine {
165165
static let couldNotOpenStream = LivenessError(code: 5, webSocketCloseCode: .unexpectedRuntimeError)
166166
static let socketClosed = LivenessError(code: 6, webSocketCloseCode: .normalClosure)
167167
static let viewResignation = LivenessError(code: 8, webSocketCloseCode: .viewClosure)
168-
static let cameraNotAvailable = LivenessError(code: 9, webSocketCloseCode: .missingVideoPermission)
168+
static let cameraNotAvailable = LivenessError(code: 9, webSocketCloseCode: .unexpectedRuntimeError)
169169
static let invalidCameraPositionSelecteed = LivenessError(code: 10, webSocketCloseCode: .unexpectedRuntimeError)
170170

171171
static func == (lhs: LivenessError, rhs: LivenessError) -> Bool {

0 commit comments

Comments
 (0)