Skip to content

chore: update error links from snake_case to kebab-case format #5544

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

bpolaszek
Copy link

All error links currently point to snake_cased anchors in the documentation, although anchors are actually kebab-cased on https://docs.meilisearch.com/errors.

i.e. invalid:
https://docs.meilisearch.com/errors#index_already_exists

valid:
https://docs.meilisearch.com/errors#index-already-exists

This PR just fixes the links so that you land on the appropriate error description in the documentation.

Sorry, that means editing tons of files, and involves a long & boring review 😅

@ManyTheFish
Copy link
Member

Hey @bpolaszek,

Thank you for your contribution.
docs.meilisearch.com is a redirection to www.meilisearch.com/docs
Could you use www.meilisearch.com/docs/* instead of docs.meilisearch.com in your PR.

Thanks again!

@bpolaszek
Copy link
Author

Sure, consider it done 👍

@bpolaszek
Copy link
Author

Looks like error code slugs are generated somehow before running tests - I'll probably need a hand to figure this out 😕

@bpolaszek bpolaszek changed the title fix: update error links from snake_case to kebab-case format chore: update error links from snake_case to kebab-case format May 7, 2025
@ManyTheFish
Copy link
Member

@bpolaszek, you should revert all the files in meilisearch/crates/dump/src/reader/ that are not v6 dumps,
This should solve most of the failing tests.
We may need to adapt the dumps after

@bpolaszek bpolaszek force-pushed the fix/documentation-error-codes branch from 558aab6 to 05acc48 Compare May 12, 2025 12:43
@ManyTheFish ManyTheFish added this to the v1.16.0 milestone May 15, 2025
@bpolaszek
Copy link
Author

bpolaszek commented Jun 12, 2025

Hi @ManyTheFish, I applied your suggestions, but CI keeps failing. My knowledge of Rust unfortunately prevents me from going further.

@martin-g
Copy link
Contributor

You need to run cargo fmt --all and commit the changes

@martin-g
Copy link
Contributor

Additionally for errors like:

Snapshot: import_dump_v2-2
Source: crates/dump/src/reader/mod.rs:699
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
    0       │-d216c7f90f538ffbb2a059531d7ac89a
          0 │+e41c6bf4f9f87c712fdddcd403b7904d

you will need to run cargo insta review to apply the new expected values in the snapshots. And commit the changes.

@bpolaszek bpolaszek force-pushed the fix/documentation-error-codes branch from 05acc48 to 43f22c6 Compare June 12, 2025 12:10
@bpolaszek
Copy link
Author

@martin-g Done.

@martin-g
Copy link
Contributor

@bpolaszek I see some unrelated failures now. Please rebase your branch to latest main!

@bpolaszek
Copy link
Author

bpolaszek commented Jun 12, 2025

It is already ! https://github.com/bpolaszek/meilisearch/commits/fix/documentation-error-codes/

PS: Don't hesitate to gh pr checkout 5544, apply changes and co-author me if somehow it's more convenient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants