-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for error codes #421
Documentation for error codes #421
Conversation
description: "There was an error in the search." | ||
- code: unsupported_media_type | ||
description: "The payload for the request is not supported by meilisearch. Meilisearch currently only support JSON payloads." | ||
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this PR ready for review?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's open for discussion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean there are missing information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No all error codes are here, but we can discuss the descriptions
errors.yaml
Outdated
- code: open_index | ||
description: "An error occured while trying to open the requested index, ..." | ||
- code: invalid_state | ||
description: "An error occuring when the database is in an invalid state. Deleting the database and reindexing should solve the problem." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "An error occuring when the database is in an invalid state. Deleting the database and reindexing should solve the problem." | |
description: "An error occurred when the database is in an invalid state. Deleting the database and reindexing should solve the problem." |
errors.yaml
Outdated
- code: invalid_index_uid | ||
description: "The provided index formatting is wrong, check out our guide on [index creation](link.com)" | ||
- code: open_index | ||
description: "An error occured while trying to open the requested index, ..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "An error occured while trying to open the requested index, ..." | |
description: "An error occurred while trying to open the requested index, ..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't have any idea to complete the ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I don't think it is clear what "opening" an index means
errors.yaml
Outdated
description: "All documents must be identified with a unique key. Meilisearch will try to infer the documetn field to use as primary key. If it can't, it has to be specified manually, and this error is returned. See <a href=\"https://docs.meilisearch.com/guides/main_concepts/documents.html#structure\">guide on primary keys</a>." | ||
- code: primary_key_already_present | ||
description: "Error thrown when trying to change the primary key for an index. See [guide on primary keys](https://docs.meilisearch.com/guides/main_concepts/documents.html#structure)." | ||
- code: max_field_limit_exceeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- code: max_field_limit_exceeded | |
- code: max_fields_limit_exceeded |
errors.yaml
Outdated
- code: primary_key_already_present | ||
description: "Error thrown when trying to change the primary key for an index. See [guide on primary keys](https://docs.meilisearch.com/guides/main_concepts/documents.html#structure)." | ||
- code: max_field_limit_exceeded | ||
description: "The maximum number of fields for a document is 65,535. When this number is exceded, this error is returned." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The maximum number of fields for a document is 65,535. When this number is exceded, this error is returned." | |
description: "The maximum number of fields for a document is 65,535. When this number is exceeded, this error is returned." |
errors.yaml
Outdated
- code: document_not_found | ||
description: "The requested document can't be retieved. It either doesn't exists, or the database was left in an inconsistent state." | ||
- code: internal | ||
description: "An error with Meilisearch internals has occured. Check the error message, and fill an issue if necessary." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "An error with Meilisearch internals has occured. Check the error message, and fill an issue if necessary." | |
description: "An error with MeiliSearch internals has occurred. Check the error message, and open an issue if necessary." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "An error with Meilisearch internals has occured. Check the error message, and fill an issue if necessary." | |
description: "MeiliSearch experienced an internal error. Check the error message, and fill an issue if necessary." |
errors.yaml
Outdated
- code: invalid_token | ||
description: "The provided token is invalid." | ||
- code: maintenance | ||
description: "The Meilisearch instance in under maintenance." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The Meilisearch instance in under maintenance." | |
description: "The MeiliSearch instance in under maintenance." |
errors.yaml
Outdated
- code: not_found | ||
description: "The requested ressources could not be found." | ||
- code: payload_too_large | ||
description: "The payload sent to the server was too large. Check out this [guide](https://docs.meilisearch.com/guides/advanced_guides/configuration.html#options) to change the maximum payload size" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The payload sent to the server was too large. Check out this [guide](https://docs.meilisearch.com/guides/advanced_guides/configuration.html#options) to change the maximum payload size" | |
description: "The payload sent to the server was too large. Check out this [guide](https://docs.meilisearch.com/guides/advanced_guides/configuration.html#options) to change the maximum payload size." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The payload sent to the server was too large. Check out this [guide](https://docs.meilisearch.com/guides/advanced_guides/configuration.html#options) to change the maximum payload size" | |
description: "The payload sent to the server was too large. Check out this [guide](https://docs.meilisearch.com/guides/advanced_guides/configuration.html#options) to customize the maximum payload size accepted by MeiliSearch." |
errors.yaml
Outdated
- code: search_error | ||
description: "There was an error in the search." | ||
- code: unsupported_media_type | ||
description: "The payload for the request is not supported by meilisearch. Meilisearch currently only support JSON payloads." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The payload for the request is not supported by meilisearch. Meilisearch currently only support JSON payloads." | |
description: "The payload for the request is not supported by MeiliSearch. MeiliSearch currently only supports JSON payloads." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The payload for the request is not supported by meilisearch. Meilisearch currently only support JSON payloads." | |
description: "The payload content type is not supported by MeiliSearch. Currently MeiliSearch supports only JSON payloads." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
errors.yaml
Outdated
--- | ||
errors: | ||
- code: create_index | ||
description: "Error relative to index creation, check out our guide on [index creation](link.com)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "Error relative to index creation, check out our guide on [index creation](link.com)" | |
description: "An error occurred while trying to create an index, check out our guide on [index creation](link.com)" |
errors.yaml
Outdated
- code: existing_index | ||
description: "An index with this name already exists, check out our guide on [index creation](link.com)" | ||
- code: invalid_index_uid | ||
description: "The provided index formatting is wrong, check out our guide on [index creation](link.com)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The provided index formatting is wrong, check out our guide on [index creation](link.com)" | |
description: "There is an error in the provided index format, check out our guide on [index creation](link.com)" |
errors.yaml
Outdated
- code: invalid_index_uid | ||
description: "The provided index formatting is wrong, check out our guide on [index creation](link.com)" | ||
- code: open_index | ||
description: "An error occured while trying to open the requested index, ..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I don't think it is clear what "opening" an index means
errors.yaml
Outdated
- code: invalid_state | ||
description: "An error occuring when the database is in an invalid state. Deleting the database and reindexing should solve the problem." | ||
- code: missing_primary_key | ||
description: "All documents must be identified with a unique key. Meilisearch will try to infer the documetn field to use as primary key. If it can't, it has to be specified manually, and this error is returned. See <a href=\"https://docs.meilisearch.com/guides/main_concepts/documents.html#structure\">guide on primary keys</a>." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "All documents must be identified with a unique key. Meilisearch will try to infer the documetn field to use as primary key. If it can't, it has to be specified manually, and this error is returned. See <a href=\"https://docs.meilisearch.com/guides/main_concepts/documents.html#structure\">guide on primary keys</a>." | |
description: "All documents must be identified with a unique key. MeiliSearch will try to infer the document field to use it as a primary key. If it can't infer it, the primary key must be specified manually, and this error is returned. See <a href=\"https://docs.meilisearch.com/guides/main_concepts/documents.html#structure\">guide on primary keys</a>." |
errors.yaml
Outdated
- code: missing_primary_key | ||
description: "All documents must be identified with a unique key. Meilisearch will try to infer the documetn field to use as primary key. If it can't, it has to be specified manually, and this error is returned. See <a href=\"https://docs.meilisearch.com/guides/main_concepts/documents.html#structure\">guide on primary keys</a>." | ||
- code: primary_key_already_present | ||
description: "Error thrown when trying to change the primary key for an index. See [guide on primary keys](https://docs.meilisearch.com/guides/main_concepts/documents.html#structure)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "Error thrown when trying to change the primary key for an index. See [guide on primary keys](https://docs.meilisearch.com/guides/main_concepts/documents.html#structure)." | |
description: "Error thrown when trying to modify the primary key of an index, when it has been already set. See [guide on primary keys](https://docs.meilisearch.com/guides/main_concepts/documents.html#structure)." |
errors.yaml
Outdated
- code: invalid_facet | ||
description: "The facet filter provided with the search is invalid. Check our [guide on faceting](https://docs.meilisearch.com/guides/advanced_guides/faceted_search.html) to troubleshoot." | ||
- code: invalid_filter | ||
description: "The facet filter provided with the search is invalid. Check our [guide on faceting](https://docs.meilisearch.com/guides/advanced_guides/filtering.html) to troubleshoot." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The facet filter provided with the search is invalid. Check our [guide on faceting](https://docs.meilisearch.com/guides/advanced_guides/filtering.html) to troubleshoot." | |
description: "The filter provided with the search is invalid. Check our [guide on faceting](https://docs.meilisearch.com/guides/advanced_guides/filtering.html) to troubleshoot." |
errors.yaml
Outdated
- code: bad_request | ||
description: "The request is invalid, check the error message for more information." | ||
- code: document_not_found | ||
description: "The requested document can't be retieved. It either doesn't exists, or the database was left in an inconsistent state." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The requested document can't be retieved. It either doesn't exists, or the database was left in an inconsistent state." | |
description: "The requested document can't be retrieved. Either it doesn't exist, or the database was left in an inconsistent state." |
errors.yaml
Outdated
- code: maintenance | ||
description: "The Meilisearch instance in under maintenance." | ||
- code: missing_authorization_header | ||
description: "The requested ressources is protected with an API key, that was not provided in the request header. Check our guide on [authentication](https://docs.meilisearch.com/guides/advanced_guides/authentication.html) for more information." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The requested ressources is protected with an API key, that was not provided in the request header. Check our guide on [authentication](https://docs.meilisearch.com/guides/advanced_guides/authentication.html) for more information." | |
description: "The requested resources are protected with an authentication system, and no API KEY was provided in the request header. Check our guide on [authentication](https://docs.meilisearch.com/guides/advanced_guides/authentication.html) for more information." |
errors.yaml
Outdated
- code: missing_authorization_header | ||
description: "The requested ressources is protected with an API key, that was not provided in the request header. Check our guide on [authentication](https://docs.meilisearch.com/guides/advanced_guides/authentication.html) for more information." | ||
- code: missing_header | ||
description: "The header is missing." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The header is missing." | |
description: "A header is missing in the HTTP request." |
errors.yaml
Outdated
- code: missing_header | ||
description: "The header is missing." | ||
- code: not_found | ||
description: "The requested ressources could not be found." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The requested ressources could not be found." | |
description: "The requested resources could not be found." |
Replaces `GET` with `POST` in examples for update `searchable-attributes`, `displayed-attributes`, and `accept-new-fields`
I don't know if we talked about this but
Are the only errors without a As we look at the other once:
Could we consider to add the error connotation to it?
Of course this is possibly not important. I say that with the idea that a error code gives you an ultra minimalistic feedback of what happened. Which is the case for all the error codes except those 3. |
I understand your concern @bidoubiwa, and I remember wanting to append "error" to those errors in the beginning. Those are error code, so it is expected that something went wrong in the process, and in that sense I don't think that prepending "could_not" adds anything, neither does appending "error". This code's purpose is to be read by a computer, and we made them readable simply for devs comfort. What do you think? |
If it is only meant to be read by computer it is indeed not usefull to add anything. But in this case I would suggest we add a So it's either one or the other. Both are good for me. |
errors.yaml
Outdated
errors: | ||
- code: create_index | ||
description: "An error occurred while trying to create an index, check out our guide on [index creation](https://docs.meilisearch.com/guides/main_concepts/indexes.html)" | ||
- code: existing_index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- code: existing_index | |
- code: index_already_exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I did not notice it before! We decided this name during a meeting because that's the only one we already use in our code since the v0.11 is out. Please don't change this one 🙏
I agree with @bidoubiwa, this is not clear that these 3 ones are errors. When I look at Stripe code error, every naming is clear and means this is an error. I don't see any "non-error" naming like |
Hello @MarinPostma We discuss with the team (@tpayet, @eskombro, and @bidoubiwa) about these 3 errors. We would rather rename it as:
We read the error descriptions to chose the naming. |
This is still in progress or is the list completed? |
Add code-samples for PHP, Go and Ruby
the list is complete |
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.21.2 to 2.22.0. - [Release notes](https://github.com/benmosher/eslint-plugin-import/releases) - [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md) - [Commits](import-js/eslint-plugin-import@v2.21.2...v2.22.0) Signed-off-by: dependabot-preview[bot] <[email protected]>
Bumps [bent](https://github.com/mikeal/bent) from 7.3.5 to 7.3.7. - [Release notes](https://github.com/mikeal/bent/releases) - [Commits](mikeal/bent@v7.3.5...v7.3.7) Signed-off-by: dependabot-preview[bot] <[email protected]>
errors.yaml
Outdated
- code: index_not_accessible | ||
description: "An internal error occurred while trying to access the requested index." | ||
- code: invalid_state | ||
description: "An error that occurs when the database is in an invalid state. Deleting the database and re indexing should solve the problem." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "An error that occurs when the database is in an invalid state. Deleting the database and re indexing should solve the problem." | |
description: "An error that occurs when the database is in an invalid state. Deleting the database and re-indexing should solve the problem." |
errors.yaml
Outdated
- code: invalid_state | ||
description: "An error that occurs when the database is in an invalid state. Deleting the database and re indexing should solve the problem." | ||
- code: missing_primary_key | ||
description: "All documents must be identified with a unique key. MeiliSearch will try to infer the document field to use it as a primary key. If it can't infer it, the primary key must be specified manually, and this error is returned. . See our [guide on primary keys](https://docs.meilisearch.com/guides/main_concepts/documents.html#structure)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "All documents must be identified with a unique key. MeiliSearch will try to infer the document field to use it as a primary key. If it can't infer it, the primary key must be specified manually, and this error is returned. . See our [guide on primary keys](https://docs.meilisearch.com/guides/main_concepts/documents.html#structure)." | |
description: "All documents must be identified with a unique key. MeiliSearch will try to infer the document field to use it as a primary key. If it can't infer it, the primary key must be specified manually, and this error is returned. See our [guide on primary keys](https://docs.meilisearch.com/guides/main_concepts/documents.html#structure)." |
errors.yaml
Outdated
- code: missing_primary_key | ||
description: "All documents must be identified with a unique key. MeiliSearch will try to infer the document field to use it as a primary key. If it can't infer it, the primary key must be specified manually, and this error is returned. . See our [guide on primary keys](https://docs.meilisearch.com/guides/main_concepts/documents.html#structure)." | ||
- code: primary_key_already_present | ||
description: "Error thrown when trying to modify the primary key of an index, when it has been already set. See [guide on primary keys](https://docs.meilisearch.com/guides/main_concepts/documents.html#structure)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "Error thrown when trying to modify the primary key of an index, when it has been already set. See [guide on primary keys](https://docs.meilisearch.com/guides/main_concepts/documents.html#structure)." | |
description: "This error is thrown when trying to modify the primary key of an index when it has been already set. See [guide on primary keys](https://docs.meilisearch.com/guides/main_concepts/documents.html#structure)." |
errors.yaml
Outdated
- code: invalid_token | ||
description: "The provided token is invalid." | ||
- code: maintenance | ||
description: "The MeiliSearch instance in under maintenance." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The MeiliSearch instance in under maintenance." | |
description: "The MeiliSearch instance is under maintenance." |
errors.yaml
Outdated
- code: maintenance | ||
description: "The MeiliSearch instance in under maintenance." | ||
- code: missing_authorization_header | ||
description: "The requested resources is protected with an API key, that was not provided in the request header. Check our guide on [authentication](https://docs.meilisearch.com/guides/advanced_guides/authentication.html) for more information." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The requested resources is protected with an API key, that was not provided in the request header. Check our guide on [authentication](https://docs.meilisearch.com/guides/advanced_guides/authentication.html) for more information." | |
description: "The requested resources are protected with an API key, that was not provided in the request header. Check our guide on [authentication](https://docs.meilisearch.com/guides/advanced_guides/authentication.html) for more information." |
errors.yaml
Outdated
- code: search_error | ||
description: "There was an error in the search." | ||
- code: unsupported_media_type | ||
description: "The payload content type is not supported by MeiliSearch. Currently MeiliSearch supports only JSON payloads." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "The payload content type is not supported by MeiliSearch. Currently MeiliSearch supports only JSON payloads." | |
description: "The payload content type is not supported by MeiliSearch. Currently, MeiliSearch supports only JSON payloads." |
Nice job! Voila! 😄 |
Bumps [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) from 0.23.1 to 0.23.2. - [Release notes](https://github.com/igorshubovych/markdownlint-cli/releases) - [Commits](igorshubovych/markdownlint-cli@v0.23.1...v0.23.2) Signed-off-by: dependabot-preview[bot] <[email protected]>
Bumps [@popperjs/core](https://github.com/popperjs/popper-core) from 2.4.2 to 2.4.4. - [Release notes](https://github.com/popperjs/popper-core/releases) - [Commits](floating-ui/floating-ui@v2.4.2...v2.4.4) Signed-off-by: dependabot-preview[bot] <[email protected]>
Bumps [vuepress-plugin-img-lazy](https://github.com/tolking/vuepress-plugin-img-lazy) from 1.0.3 to 1.0.4. - [Release notes](https://github.com/tolking/vuepress-plugin-img-lazy/releases) - [Commits](tolking/vuepress-plugin-img-lazy@v1.0.3...v1.0.4) Signed-off-by: dependabot-preview[bot] <[email protected]>
meilisearch/meilisearch#683