http 응답 검증 로직 추가
This commit is contained in:
@@ -227,11 +227,24 @@ namespace UVC.Data
|
||||
}
|
||||
|
||||
IDataObject? dataObject = null;
|
||||
result = result.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
result = result.Trim();
|
||||
try
|
||||
{
|
||||
string? responseData = info.ResponseMask.Apply(result);
|
||||
// responseData가 null인 경우는 올바른 응답이 아니므로 처리하지 않음
|
||||
if (responseData == null)
|
||||
{
|
||||
throw new Exception($"유효하지 않은 response data. {result}");
|
||||
}
|
||||
else
|
||||
{
|
||||
result = responseData.Trim();
|
||||
}
|
||||
|
||||
|
||||
if (result.StartsWith("{"))
|
||||
{
|
||||
if (info.DataMapper != null)
|
||||
|
||||
Reference in New Issue
Block a user