fix: reduce endpoint nullability warnings
TaxBaik CI/CD / build-and-deploy (push) Failing after 5m10s

This commit is contained in:
2026-07-04 18:24:29 +09:00
parent d08de4fa10
commit 878ffdd3bb
9 changed files with 57 additions and 45 deletions
@@ -86,9 +86,9 @@ public class GetAllEndpoint : Endpoint<EmptyRequest, TaxProfileListResponse>
var profiles = await _service.GetAllAsync();
await SendAsync(new TaxProfileListResponse { Data = profiles.Cast<object>().ToList() }, 200, cancellation: ct);
}
catch (Exception ex)
catch
{
ThrowError(ex.Message, statusCode: 500);
ThrowError("세무 프로필 조회 실패", statusCode: 500);
}
}
}
@@ -114,9 +114,9 @@ public class GetByClientIdEndpoint : Endpoint<EmptyRequest, object>
ThrowError("세무 프로필을 찾을 수 없습니다.", statusCode: 404);
await SendAsync(profile, 200, cancellation: ct);
}
catch (Exception ex)
catch
{
ThrowError(ex.Message, statusCode: 500);
ThrowError("세무 프로필 조회 실패", statusCode: 500);
}
}
}
@@ -139,9 +139,9 @@ public class GetHighRiskEndpoint : Endpoint<EmptyRequest, TaxProfileListResponse
var profiles = await _service.GetHighRiskProfilesAsync();
await SendAsync(new TaxProfileListResponse { Data = profiles.Cast<object>().ToList() }, 200, cancellation: ct);
}
catch (Exception ex)
catch
{
ThrowError(ex.Message, statusCode: 500);
ThrowError("고위험 세무 프로필 조회 실패", statusCode: 500);
}
}
}
@@ -164,9 +164,9 @@ public class GetUpcomingFilingsEndpoint : Endpoint<DaysAheadQuery, object>
var profiles = await _service.GetUpcomingFilingDuesAsync(request.DaysAhead);
await SendAsync(new { data = profiles, daysAhead = request.DaysAhead }, 200, cancellation: ct);
}
catch (Exception ex)
catch
{
ThrowError(ex.Message, statusCode: 500);
ThrowError("예정 신고 조회 실패", statusCode: 500);
}
}
}
@@ -187,6 +187,8 @@ public class UpdateEndpoint : Endpoint<UpdateTaxProfileRequest, TaxProfileUpdate
var id = Route<int>("id");
try
{
if (request.TaxRiskLevel is null)
request.TaxRiskLevel = "normal";
await _service.UpdateAsync(id, request.BusinessType, request.AccountingMethod,
request.NextFilingDueDate, request.TaxRiskLevel);
await SendAsync(new TaxProfileUpdateResponse { Message = "세무 프로필이 수정되었습니다." }, 200, cancellation: ct);
@@ -195,9 +197,9 @@ public class UpdateEndpoint : Endpoint<UpdateTaxProfileRequest, TaxProfileUpdate
{
ThrowError(ex.Message);
}
catch (Exception ex)
catch
{
ThrowError(ex.Message, statusCode: 500);
ThrowError("세무 프로필 수정 실패", statusCode: 500);
}
}
}