Skip to content

Add "try" in the code samples #322

@brunoocasali

Description

@brunoocasali

Add try mark to .code-samples.meilisearch.yml where it's needed:

example:

let client = MeiliSearch(host: "http://localhost:7700", apiKey: "apiKey")

new:

let client = try MeiliSearch(host: "http://localhost:7700", apiKey: "apiKey")

because the MeiliSearch constructor can throw an error if the host is invalid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions