private async Task <bool> HandledDojCastError(ILogger log, Stop stop, DateTime date, string fileName, Guid submissionId, string runId) { try { log.LogWarning($"Handling DoJ Cast Error: {stop.Id} : {runId}"); SubmissionError submissionError = new SubmissionError() { Code = "FTS", Message = "Failed to submit to DOJ. Stop to DOJ Cast failure", DateReported = date, ErrorType = Enum.GetName(typeof(SubmissionErrorType), SubmissionErrorType.SubmissionError), FileName = fileName, SubmissionId = submissionId }; await _stopCosmosDbService.UpdateStopAsync(_stopService.ErrorSubmission(stop, submissionError, Enum.GetName(typeof(SubmissionStatus), SubmissionStatus.Failed))); return(true); } catch (Exception ex) { log.LogError($"Exception: {ex} --> occurred during HandleDojCastError with stop id {stop.Id}"); return(false); } }