// GET: api/cliente/{cliente-id} public IHttpActionResult Get(string id) { Cliente cliente = null; try { cliente = PriIntegration.GetClienteInfo(id); } catch (InvalidOperationException e) { return(BadRequest(e.Message)); } catch (Exception) { return(InternalServerError()); } if (cliente == null) { return(NotFound()); } else { return(Ok(cliente)); } }