data = $data; } /** * Execute the job. */ public function handle(TransactionService $transactionService): void { try { $transactionService->recordInvoice($this->data); } catch (\Exception $e) { Log::error('Failed to process invoice: ' . $e->getMessage(), [ 'data' => $this->data, 'exception' => $e ]); throw $e; } } }