Skip to content

Commit

Permalink
[DI-1399] - Fixing the error message in the ingestion log when a post…
Browse files Browse the repository at this point in the history
… request fails. (#140)
  • Loading branch information
mjimdev authored Jan 6, 2025
1 parent 91709b3 commit 07ebc60
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ private void ThrowIfMetadataIsIncompatible(DataMap dataMap)
RowNumber = rowNum,
EducationOrganizationId = GetEdOrgId(currentRow, map.SelectedIngestionLogEdOrgIdColumn)
};
return Task.FromResult((RowResult.Error, new IngestionLogMarker(IngestionResult.Error, LogLevels.Error, rowWithError, $"{odsApi.Config.ApiUrl}{map.ResourcePath}", null, ex.Message)));
return Task.FromResult((RowResult.Error, new IngestionLogMarker(IngestionResult.Error, LogLevels.Error, rowWithError, $"{odsApi.Config.ApiUrl}{map.ResourcePath}", null, null, null, ex.Message)));
}

return mappedRow == null
Expand Down Expand Up @@ -450,7 +450,7 @@ private MappedResource TransformCsvRow(DataMap dataMap, Dictionary<string, strin
catch (Exception ex)
{
_logger.LogError(ex, "POST failed for resource: {url}, Row Number: {row}", endpointUrl, mappedRow.RowNumber);
return (RowResult.Error, new IngestionLogMarker(IngestionResult.Error, LogLevels.Error, mappedRow, endpointUrl));
return (RowResult.Error, new IngestionLogMarker(IngestionResult.Error, LogLevels.Error, mappedRow, endpointUrl, null, null, null, ex.Message));
}

switch (odsResponse.StatusCode)
Expand Down

0 comments on commit 07ebc60

Please sign in to comment.