public IHttpActionResult GetByName(string name) { try { ClientsDto client = clientsService.GetByName(name); if (client != null) { return(Ok(client)); } else { return(NotFound()); } } catch (VuelingExceptions ex) { throw new HttpResponseException(HttpStatusCode.BadRequest); } }