public ActionResult Text(RenderActions.Text text) { string result = null; try { _renderer.Text(text); } catch (ArgumentException ex) { result = ex.Message; } if (result == null) { return(Accepted()); } else { return(BadRequest(result)); } }