public IHttpActionResult GetAvisos() { List <string> result = null; try { result = PriIntegration.GetAvisosPorLer(); } catch (InvalidOperationException e) { return(BadRequest(e.Message)); } catch (Exception) { return(InternalServerError()); } if (result == null) { return(InternalServerError()); } else { return(Ok(result)); } }