private void TryOperation(Action action)
{
try
{
action.Invoke();
}
catch (ArgumentException e)
{
Response = WorkflowHttpResponse.BadRequest(e);
}
catch (InvalidOperationException e)
{
Response = WorkflowHttpResponse.Forbidden(e);
}
catch (Exception e)
{
Response = WorkflowHttpResponse.InternalServerError(e);
}
}