Skip to content

Commit 8df23c1

Browse files
add links and error codes
1 parent 4ec1f39 commit 8df23c1

File tree

5 files changed

+41
-3
lines changed

5 files changed

+41
-3
lines changed

learn/async/asynchronous_operations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Tasks always contain a field indicating the task's current `status`. This field
8383
- **`failed`**: a failure occurred when processing the task. No changes were made to the database
8484
- **`canceled`**: the task was canceled
8585

86-
`succeeded`, `failed`, and `canceled` tasks are finished tasks. Meilisearch keeps them in the task database but has finished processing these tasks. It is possible to [configure a webhook](/learn/self_hosted/configure_meilisearch_at_launch#task-webhook-url) to notify external services when a task is finished.
86+
`succeeded`, `failed`, and `canceled` tasks are finished tasks. Meilisearch keeps them in the task database but has finished processing these tasks. It is possible to [configure a webhook](/reference/api/webhooks) to notify external services when a task is finished.
8787

8888
`enqueued` and `processing` tasks are unfinished tasks. Meilisearch is either processing them or will do so in the future.
8989

learn/async/task_webhook.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ description: Learn how to use webhooks to react to changes in your Meilisearch d
55
sidebarDepth: 3
66
---
77

8-
This guide teaches you how to use webhooks to notify a URL when Meilisearch completed a [task](/learn/async/asynchronous_operations).
8+
This guide teaches you how to configure a single webhook via instance options to notify a URL when Meilisearch completes a [task](/learn/async/asynchronous_operations).
9+
10+
<Tip>
11+
If you are using Meilisearch Cloud or need to configure multiple webhooks, use the [`/webhooks` API route](/reference/api/webhooks) instead.
12+
</Tip>
913

1014
## Requirements
1115

learn/async/working_with_tasks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ This will return the full task object:
8686
}
8787
```
8888

89-
If the task is still `enqueued` or `processing`, wait a few moments and query the database once again. If you are working with a self-hosted Meilisearch instance, you may also [set up a webhook listener](/learn/async/task_webhook).
89+
If the task is still `enqueued` or `processing`, wait a few moments and query the database once again. You may also [set up a webhook listener](/reference/api/webhooks).
9090

9191
When `status` changes to `succeeded`, Meilisearch has finished processing your request.
9292

learn/self_hosted/configure_meilisearch_at_launch.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,8 @@ Notifies the configured URL whenever Meilisearch [finishes processing a task](/l
495495

496496
The webhook payload contains the list of finished tasks in [ndjson](https://github.com/ndjson/ndjson-spec). For more information, [consult the dedicated task webhook guide](/learn/async/task_webhook).
497497

498+
The task webhook option is only available for self-hosted instances. If you are using Meilisearch Cloud, use the [`/webhooks` API route](/reference/api/webhooks) instead.
499+
498500
### Task webhook authorization header
499501

500502
**Environment variable**: `MEILI_TASK_WEBHOOK_AUTHORIZATION_HEADER`<br />

reference/errors/error_codes.mdx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@ The [`uid`](/reference/api/indexes#index-object) field of an index cannot be mod
8282

8383
The [`updatedAt`](/reference/api/indexes#index-object) field of an index cannot be modified.
8484

85+
### `immutable_webhook`
86+
87+
You tried to modify a reserved [webhook](/reference/api/webhooks). Reserved webhooks are configured by Meilisearch Cloud and have `isEditable` set to `true`. Webhooks created with an instance option are also ummutable.
88+
89+
### `immutable_webhook_uuid`
90+
91+
You tried to manually set a webhook `uuid`. Meilisearch automatically generates `uuid` for webhooks.
92+
93+
### `immutable_webhook_is_editable`
94+
95+
You tried to manually set a webhook's `isEditable` field. Meilisearch automatically sets `isEditable` for all webhooks. Only reserved webhooks have `isEditable` set to `false`.
96+
8597
## `index_already_exists`
8698

8799
An index with this [`uid`](/reference/api/indexes#index-object) already exists, check out our guide on [index creation](/learn/getting_started/indexes).
@@ -595,6 +607,22 @@ The requested task type is invalid. Please use one of the [possible values](/ref
595607

596608
The [`uids`](/reference/api/tasks#query-parameters) query parameter is invalid.
597609

610+
### `invalid_webhooks`
611+
612+
The create webhook request did not contain a valid JSON payload. Meilisearch also returns this error when you try to create more than 20 webhooks.
613+
614+
### `invalid_webhook_url`
615+
616+
The provided webhook URL isn’t a valid JSON value, `null`, or missing.
617+
618+
### `invalid_webhook_headers`
619+
620+
The provided webhook `headers` field is not a JSON object or not a valid HTTP header. Meilisearch also returns this error if you set more than 200 header fields for a single webhook.
621+
622+
### `invalid_webhook_uuid`
623+
624+
The provided webhook `uuid` is not a valid uuid v4 value.
625+
598626
## `io_error`
599627

600628
This error generally occurs when the host system has no space left on the device or when the database doesn't have read or write access.
@@ -726,3 +754,7 @@ The remote instance answered with `500 INTERNAL ERROR`.
726754
### `remote_timeout`
727755

728756
The proxy did not answer in the allocated time.
757+
758+
### `webhook_not_found`
759+
760+
The provided webhook `uuid` does not correspond to any configured webhooks in the instance.

0 commit comments

Comments
 (0)