public async Task RunJobAsync(JobItemBase job) { try { await job.ProcessJobAsync(_sender); } catch (FdaProcessingException fpe) { _logger.LogError(fpe, $"Processing failed for {job.Id}"); await _sender.SendErrorAsync(job.Id, fpe.ReportUrl); } catch (Exception e) { _logger.LogError(e, $"Processing failed for {job.Id}"); await _sender.SendErrorAsync(job.Id, e.Message); } }
private async Task RunJobAsync(JobItemBase job) { try { await job.ProcessJobAsync(_sender); } catch (FdaProcessingException fpe) { _logger.LogError(fpe, $"Processing failed for {job.Id}"); await _sender.SendErrorAsync(job.Id, fpe.ReportUrl); } catch (Exception e) { _logger.LogError(e, $"Processing failed for {job.Id}"); var message = $"Internal error. Try to repeat your last action and please report the following message: {e.Message}"; await _sender.SendErrorAsync(job.Id, message); } }