diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 43277e3a..7ca38900 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -3930,10 +3930,14 @@ class EmployeeRestController extends AdminController log_message('error', 'Ticket validation | Ticket ID: ' . $ticket_id . ' | Matching active tickets with NULL TPA reference: ' . $count); if ($count > 0 && $pdf_exist_in_the_file && $tpa_claim_push == true) { - // this call for TPA integration - $apiServiceController = new ApiServiceController(); - $apiServiceController->pushClaims($ticket_id); - log_message('error', "pushClaims function called with Ticket ID: {$ticket_id}, In Employee Rest Controller"); + try { + // this call for TPA integration + $apiServiceController = new ApiServiceController(); + $apiServiceController->pushClaims($ticket_id); + log_message('error', "pushClaims function called with Ticket ID: {$ticket_id}, In Employee Rest Controller"); + } catch (\Throwable $e) { + log_message('error', "Error in TPA Claim Push via Benifits or HR : ApiServiceController pushClaims function call for Ticket ID: {$ticket_id}. Error: " . $e->getMessage() . " Trace: " . $e->getTraceAsString()); + } } else { if($tpa_claim_push == false){ log_message('error', 'Skip the TPA claim push for IR DOCUMENTS');