public IActionResult Post([FromBody] ShortUrl value) { try { var @new = _shortenerService.Generate(value.FullUrl); return(Created($"/shortener/{@new.Id}", @new)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }