public IHttpActionResult Execute(HeyController controller) { HeyRememberDeferredExecution deferredExecution = _methodBinder.CreateDeferredExecution(); HeyRememberDto heyRemember = deferredExecution.HeyRemember; try { string jobId = _scheduleType.Schedule(deferredExecution); string heyId = $"{heyRemember.Domain}/{(heyRemember.Type != string.Empty ? heyRemember.Type + "/" : string.Empty)}{heyRemember.Name}/{heyRemember.Id}/{jobId}"; _log.Info($"{heyRemember} scheduled on {heyId}"); var heyRememberReturn = new HeyRememberDto(heyRemember); heyRememberReturn.When[0] = new FindDatesFromHeyRemember(heyRememberReturn).Next(); return(_returnType.Return(heyId, heyRememberReturn, controller)); } catch (Exception ex) { _log.Error($"{heyRemember}: Error while trying to schedule job", ex); return(controller.ExposedInternalServerError(ex)); } }
public IHttpActionResult Execute(HeyController controller) { _log.Error($"{_heyRemember}: error processing this request"); return(controller.ExposedInternalServerError(_exception)); }