Skip to content

Commit

Permalink
imporve msg
Browse files Browse the repository at this point in the history
  • Loading branch information
romainfrancois committed Apr 20, 2024
1 parent cbaf9ad commit 341eb1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/httr2.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ req_mistral_perform <- function(req, error_call = caller_env()) {
i = "Perhaps using {.fn usethis::edit_r_environ}"
)
} else if (status == 400 && resp_body_json(resp)$type == "invalid_model") {
model <- req$body$data$model
c(
"Invalid mistrai.ai model {.emph {model}}.",
i = "Use one of {.or {models()}}."
"Invalid mistrai.ai model {.val {model}}.",
i = "Available models: {.val {models()}}."
)
} else {
"Error with {.url {url}}."
Expand Down

0 comments on commit 341eb1a

Please sign in to comment.