Skip to content

Commit 43b9e3c

Browse files
authored
Merge pull request #325 from mgregoire254/add-try-to-code-samples
Added the try keyword in front of MeiliSearch() constructor in the co…
2 parents 8800aaf + 3ade691 commit 43b9e3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.code-samples.meilisearch.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ getting_started_update_displayed_attributes: |-
10671067
}
10681068
}
10691069
getting_started_communicating_with_a_protected_instance: |-
1070-
let client = MeiliSearch(host: "http://localhost:7700", apiKey: "apiKey")
1070+
let client = try MeiliSearch(host: "http://localhost:7700", apiKey: "apiKey")
10711071
client.index("movies").search { (result) in
10721072
switch result {
10731073
case .success(let searchResult):
@@ -1402,7 +1402,7 @@ geosearch_guide_sort_usage_2: |-
14021402
}
14031403
}
14041404
landing_getting_started_1: |-
1405-
let client = MeiliSearch(host: "http://localhost:7700", apiKey: "masterKey")
1405+
let client = try MeiliSearch(host: "http://localhost:7700", apiKey: "masterKey")
14061406
let documents = """
14071407
[
14081408
{ "id": 1, "title": "Carol" },

0 commit comments

Comments
 (0)