Files
KArtSell.Aegis/docs/Design/kbx-foundation-v60-status-canonical-contract-hardening/backend/Shared/Integrations/KbxIntegrationProblemFactory.cs
T
kjh2064 3f293d8aa8
deploy / deploy (push) Successful in 1m52s
deploy / notify (push) Successful in 1s
V13-FE-006: consolidate approved UI and contract hardening
2026-08-13 02:41:00 +09:00

21 lines
894 B
C#

using Shared.Problems;
namespace Kbx.Shared.Integrations;
public static class KbxIntegrationProblemFactory
{
public static KbxIntegrationProblem ToProblem(KbxIntegrationAttemptResult result) => result.FailureKind switch
{
KbxIntegrationFailureKind.Transient => KbxIntegrationProblem.Create(
result.Code ?? "INTEGRATION_DELAYED",
"외부 연계가 지연되고 있습니다.",
retryable: true,
detail: "시스템이 자동 재처리합니다. 동일 업무를 다시 실행하지 마세요."),
_ => KbxIntegrationProblem.Create(
result.Code ?? "INTEGRATION_FAILED",
"외부 연계를 완료하지 못했습니다.",
retryable: false,
detail: "업무 데이터는 유지됩니다. 확인 필요 항목에서 원인과 재처리 가능 여부를 확인하세요."),
};
}