Unclear error message in case of data upload with invalid time period
When uploading data with invalid time period (for example 2019-W53), the data transfer e-mail says:
Completion status: TimedOutAborted
Date Level Message
03/24/2021 13:53:44 NOTICE The request with ID 81 was successfully registered.
03/24/2021 13:53:44 WARN The processing of observations was stopped and dropped due to one or more errors. Please read the details of the error(s) to see how to resolve it/them.
03/24/2021 13:53:44 ERROR Semantic Error - 404
and there is the following exception in the log:
Org.Sdmxsource.Sdmx.Api.Exception.SdmxSemmanticException: Semantic Error - 404 at Org.Sdmxsource.Sdmx.Util.Date.DateUtil.GetTimeFormatOfDate(String dateStr) at DotStat.DB.DateUtils.GetPeriod(String sdmxTime) at DotStat.Db.Reader.SdmxObservationReader.Fill(Object[] values) at DotStat.Db.Reader.SdmxObservationReader.Read() at System.Data.SqlClient.SqlBulkCopy.ReadFromRowSourceAsync(CancellationToken cts) at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalAsync(CancellationToken ctoken) at System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServerAsync(Int32 columnCount, CancellationToken ctoken) at System.Data.SqlClient.SqlBulkCopy.WriteToServer(IDataReader reader) at DotStat.Db.Repository.SqlServer.SqlDataStoreRepository.BulkInsertData(IEnumerable
1 observations, CodeTranslator translator, Dataflow dataflow, List
1& errors) at DotStat.Transfer.Consumer.SqlConsumer.Save(ITransferParam transferParam, Dataflow dataflow, TransferContent transferContent, IManagementRepository mgmtRepository, ITransactionRepository transRepository, IDataStoreRepository dataStoreRepository, ISqlDatasetAttributeDatabaseValidator datasetAttributeDatabaseValidator, IDatasetAttributeValidator datasetAttributeValidator, ICodeTranslator codeTranslator) in C:\git\dotstatsuite-core-transfer\DotStat.Transfer\Consumer\SqlConsumer.cs:line 224 at DotStat.Transfer.Consumer.SqlConsumer.Save(ITransferParam transferParam, Dataflow dataflow, TransferContent transferContent) in C:\git\dotstatsuite-core-transfer\DotStat.Transfer\Consumer\SqlConsumer.cs:line 75 at DotStat.Transfer.Manager.SdmxFileToSqlTransferManager.Transfer(SdmxFileToSqlTransferParam transferParam) in C:\git\dotstatsuite-core-transfer\DotStat.Transfer\Manager\SdmxFileToSqlTransferManager.cs:line 35 at DotStatServices.Transfer.Controllers.ImportController.<>c__DisplayClass13_1`1.<b__0>d.MoveNext() in C:\git\dotstatsuite-core-transfer\DotStatServices.Transfer\Controllers\ImportController.cs:line 266
In addition to "Semantic error - 404" the data transfer e-mail/log should include the underlying concrete reason as well as the row/observation number where the error occurred and recommendations for solving it: "Observation number 25: Invalid Date Format '2021-W53' for dimension TIME_PERIOD. The upload has been cancelled. Correct the observation and resubmit your request.".