diff --git a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/FaceLivenessSession.swift b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/FaceLivenessSession.swift index ba88e7d7ce..e79ac33e1a 100644 --- a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/FaceLivenessSession.swift +++ b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/FaceLivenessSession.swift @@ -183,6 +183,7 @@ public final class FaceLivenessSession: LivenessService { return fallbackDecoding(message) } } catch { + onComplete(.runtimeError) return false } case .success: diff --git a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/ServerDisconnection.swift b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/ServerDisconnection.swift index f85b01024b..8b1dab8cd5 100644 --- a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/ServerDisconnection.swift +++ b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/ServerDisconnection.swift @@ -11,4 +11,5 @@ import Foundation public enum ServerDisconnection { case disconnectionEvent case unexpectedClosure(URLSessionWebSocketTask.CloseCode) + case runtimeError }