Skip to content

Commit

Permalink
fix last_error vignette for gh
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkowa committed Apr 5, 2024
1 parent 7f872eb commit 37add29
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions vignettes/sc_last_error.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ try(readRDS("sc_last_error/invalid_key.rds") %>%
STATcubeR:::sc_check_response())
```

```{r, echo=FALSE}
```{r, echo=FALSE, eval = FALSE}
sc_last_error_parsed() %>% str()
```

Expand All @@ -61,10 +61,6 @@ If an invalid API key is used for a request, a 401 status is returned.
sc_info(key = "wrong key")
```

```{r, echo = FALSE, error=TRUE}
readRDS("sc_last_error/invalid_key.rds") %>% STATcubeR:::sc_check_response()
```

This example passes the API key as a parameter for simplicity.
In practice, you should set up your key according to the `r ticle('sc_key')`.

Expand Down Expand Up @@ -102,7 +98,7 @@ If the rate limit for the amount of requests against the `/table` endpoint is ex
sc_table_saved("defaulttable_deake005")
```

```{r, echo = FALSE, error=TRUE}
```{r, echo = FALSE, error=TRUE, eval = FALSE}
readRDS("sc_last_error/rate_limit.rds") %>% STATcubeR:::sc_check_response()
```

Expand All @@ -118,7 +114,7 @@ Invalid URIs used with `sc_schema` will be displayed with a special error type `
sc_schema("invalid_uri")
```

```{r, echo = FALSE, error=TRUE}
```{r, echo = FALSE, error=TRUE, eval = FALSE}
readRDS("sc_last_error/schema.rds") %>% STATcubeR:::sc_check_response()
```

Expand All @@ -132,7 +128,7 @@ If an invalid table URI is passed, the server will respond with a status code of
sc_table_saved("invalid_uri")
```

```{r, echo = FALSE, error=TRUE}
```{r, echo = FALSE, error=TRUE, eval = FALSE}
readRDS("sc_last_error/table_saved.rds") %>% STATcubeR:::sc_check_response()
```

Expand All @@ -159,7 +155,7 @@ readLines("request.json") %>% cat(sep = "\n")
sc_table("request.json")
```

```{r, echo = FALSE, error = TRUE}
```{r, echo = FALSE, error = TRUE, eval = FALSE}
readRDS("sc_last_error/invalid_json.rds") %>% STATcubeR:::sc_check_response()
```

Expand Down

0 comments on commit 37add29

Please sign in to comment.