Check import results
This commit is contained in:
@ -296,29 +296,5 @@ namespace Hcs.Client.Api.Request.HouseManagement
|
||||
|
||||
return contract;
|
||||
}
|
||||
|
||||
private getStateResultImportResultCommonResult[] GetCommonResults(IEnumerable<getStateResultImportResult> importResults)
|
||||
{
|
||||
var result = new List<getStateResultImportResultCommonResult>();
|
||||
foreach (var importResult in importResults)
|
||||
{
|
||||
importResult.Items.OfType<ErrorMessageType>().ToList().ForEach(error =>
|
||||
{
|
||||
throw RemoteException.CreateNew(error.ErrorCode, error.Description);
|
||||
});
|
||||
|
||||
var commonResults = importResult.Items.OfType<getStateResultImportResultCommonResult>();
|
||||
foreach (var commonResult in commonResults)
|
||||
{
|
||||
commonResult.Items.OfType<CommonResultTypeError>().ToList().ForEach(error =>
|
||||
{
|
||||
throw RemoteException.CreateNew(error.ErrorCode, error.Description);
|
||||
});
|
||||
}
|
||||
|
||||
result.AddRange(commonResults);
|
||||
}
|
||||
return [.. result];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user