fix:예정 세액 계산 실패 시 상세 에러 로깅 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-11 12:38:47 +09:00
parent 3241eee0de
commit efb0c23aef

View File

@@ -272,7 +272,13 @@ public function index(Request $request): JsonResponse
$prelimPeriod = substr($period, 0, -1) . 'P';
$stats['preliminaryVat'] = $this->calculatePeriodNetVat($tenantId, $prelimPeriod);
} catch (\Throwable $e) {
\Log::warning('예정 세액 계산 실패: ' . $e->getMessage());
\Log::error('예정 세액 계산 실패', [
'message' => $e->getMessage(),
'file' => $e->getFile() . ':' . $e->getLine(),
'trace' => array_slice(array_map(fn($t) => ($t['file'] ?? '') . ':' . ($t['line'] ?? '') . ' ' . ($t['function'] ?? ''), $e->getTrace()), 0, 5),
'tenant_id' => $tenantId,
'period' => $prelimPeriod ?? null,
]);
$stats['preliminaryVat'] = null;
}
}