diff --git a/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportOrchestratorJob.cs b/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportOrchestratorJob.cs index 555dbf3c1f..1089b41409 100644 --- a/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportOrchestratorJob.cs +++ b/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportOrchestratorJob.cs @@ -187,6 +187,7 @@ public async Task ExecuteAsync(JobInfo jobInfo, IProgress progre { HttpStatusCode = HttpStatusCode.BadRequest, ErrorMessage = processingEx.Message, + ErrorDetails = processingEx.ToString(), }; // Cancel other processing jobs @@ -207,6 +208,7 @@ public async Task ExecuteAsync(JobInfo jobInfo, IProgress progre { HttpStatusCode = HttpStatusCode.InternalServerError, ErrorMessage = ex.Message, + ErrorDetails = ex.ToString(), }; // Cancel processing jobs for critical error in orchestrator job @@ -229,6 +231,7 @@ public async Task ExecuteAsync(JobInfo jobInfo, IProgress progre { HttpStatusCode = HttpStatusCode.InternalServerError, ErrorMessage = ex.Message, + ErrorDetails = ex.ToString(), }; throw new RetriableJobException(JsonConvert.SerializeObject(postProcessErrorResult)); diff --git a/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportOrchestratorJobErrorResult.cs b/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportOrchestratorJobErrorResult.cs index ae6475e550..34e5be28cd 100644 --- a/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportOrchestratorJobErrorResult.cs +++ b/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportOrchestratorJobErrorResult.cs @@ -15,7 +15,7 @@ public class ImportOrchestratorJobErrorResult public HttpStatusCode HttpStatusCode { get; set; } /// - /// Details error message + /// Error message /// public string ErrorMessage { get; set; } @@ -23,5 +23,10 @@ public class ImportOrchestratorJobErrorResult /// Inner error if there're multiple errors /// public ImportOrchestratorJobErrorResult InnerError { get; set; } + + /// + /// Details + /// + public string ErrorDetails { get; set; } } } diff --git a/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportProcessingJob.cs b/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportProcessingJob.cs index db86ae30d6..5bae292fa5 100644 --- a/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportProcessingJob.cs +++ b/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportProcessingJob.cs @@ -138,7 +138,7 @@ public async Task ExecuteAsync(JobInfo jobInfo, IProgress progre catch (Exception ex) { _logger.LogInformation(ex, "Critical error in import processing job."); - var error = new ImportProcessingJobErrorResult() { Message = ex.Message }; + var error = new ImportProcessingJobErrorResult() { Message = ex.Message, Details = ex.ToString() }; throw new JobExecutionException(ex.Message, error, ex); } } diff --git a/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportProcessingJobErrorResult.cs b/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportProcessingJobErrorResult.cs index 966d71af61..19d7345608 100644 --- a/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportProcessingJobErrorResult.cs +++ b/src/Microsoft.Health.Fhir.Core/Features/Operations/Import/ImportProcessingJobErrorResult.cs @@ -8,5 +8,7 @@ namespace Microsoft.Health.Fhir.Core.Features.Operations.Import public class ImportProcessingJobErrorResult { public string Message { get; set; } + + public string Details { get; set; } } }