From 859b8771a54d1e787ef8b769bd9de2a21919a0c2 Mon Sep 17 00:00:00 2001 From: jojo aquino Date: Sun, 27 Apr 2025 11:24:45 +0100 Subject: [PATCH] error handling if FR fails --- .../EnotaryoPH.Web/Pages/BaseTakeSelfiePageModel.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/EnotaryoPH/EnotaryoPH.Web/Pages/BaseTakeSelfiePageModel.cs b/EnotaryoPH/EnotaryoPH.Web/Pages/BaseTakeSelfiePageModel.cs index 54e51c6..2a2133d 100644 --- a/EnotaryoPH/EnotaryoPH.Web/Pages/BaseTakeSelfiePageModel.cs +++ b/EnotaryoPH/EnotaryoPH.Web/Pages/BaseTakeSelfiePageModel.cs @@ -111,9 +111,16 @@ namespace EnotaryoPH.Web.Pages Status = false, FacePlugins = [] }; - var result = await client.VerifyAsync(faceVerificationRequest); - var faceMatches = result.Result.SelectMany(x => x.FaceMatches); - return faceMatches; + try + { + var result = await client.VerifyAsync(faceVerificationRequest); + var faceMatches = result.Result.SelectMany(x => x.FaceMatches); + return faceMatches; + } + catch (Exception) + { + return Enumerable.Empty(); + } } [BindProperty]