This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Errors - Add variant for invalid_filter
/invalid_sort
when related settings are empty
#125
Merged
gmourier
merged 2 commits into
develop
from
patch-sort-and-filter-add-variant-for-empty-settings
Mar 31, 2022
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm not sure why, but this works:
https://docs.meilisearch.com/reference/api/error_codes.html#invalid-filter
nothttps://docs.meilisearch.com/reference/api/error_codes.html#invalid_filter
.Any thoughts @guimachiavelli @bidoubiwa ?
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.
Good spot @brunoocasali! May need to update the whole specification then 🥷 At least the link leads to the errors page.
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.
The errors page story is an old one built on an ancient and questionable script. See meilisearch/documentation#1299
But good new, it is being updated by @maryamsulemani97 meilisearch/documentation#1503
Once that PR is merged there shouldn't be any anchor problems and we'll be able to search for error codes in the search bar of the documentation
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.
As long as the anchors work and the routes returned by the binary do not fall on a 404, it is all good on our side.
Please, let us know if we need to make a change on our end. On the other side, it could be managed with redirections on the documentation site 😇
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.
The Errors page was until recently completely separate from the regular docs website. While all our docs are written in markdown, that specific page was generated from a
yaml
file as described by @bidoubiwa. We scrapped that a few weeks ago and moved the Errors page completely inside vuepress. The transition was a glorified copypaste ofyaml
content into anmd
file; it also moveddocs.meilisearch.com/errors
intodocs.meilisearch.com/api/error_codes.html
. meilisearch/documentation#1503 will further improve the page (and possibly move it again).The anchor link formatting is related to this transition. Vuepress automatically turns spaces into
-
, not_
.docs.meilisearch.com/errors#invalid_filter
only worked because the Errors page was outside vuepress. Now that the Errors page is being parsed as markdown, all anchor links will use-
.We are already redirecting regular links (
https://docs.meilisearch.com/errors
) to the new page (https://docs.meilisearch.com/reference/api/errors
), but I'm unsure our redirects allow us to do the same for anchor links. Even if it is possible, it would probably require a lot of effort for relatively little gain (as @gmourier says, users are still brought to the correct page).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.
Thanks, @guimachiavelli for the information! It should be easy to change the links on the core side if it's not possible to have a redirection on the documentation side that would lead to the right anchor.
The advantage of redirection is that we are all more independent.
It's not a big problem, just let me know if the redirection is possible when we have time to explore this topic. Then we'll see. 🚀