MeiliSearch/meilisearch-http/src
bors[bot] 2b2e571c76
Merge #2460
2460: Create custom error types for `TaskType`, `TaskStatus`, and `IndexUid` r=Kerollmops a=walterbm

# Pull Request

## What does this PR do?
Fixes #2443 by making the following changes:

- Add custom `TaskTypeError` for `TaskType::from_str` 
- Add custom `TaskStatusError` for `TaskStatus::from_str`
- Add custom `IndexUidFormatError` for `IndexUid::from_str`
- Implement `From<IndexUidFormatError> for IndexResolverError` to convert between errors
- Replace all usages of `IndexUid::new` with `IndexUid::from_str`
    - **NOTE** I am relatively new to Rust and I struggled a lot with this final part. This PR ended up with a messy error conversion which does not seem ideal. Please let me know if you have any suggestions for how to make this better and I'll be happy to make any updates!

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: walter <walter.beller.morales@gmail.com>
2022-06-09 09:10:28 +00:00
..
analytics Fix the segment analytics tests 2022-06-06 10:44:46 +02:00
extractors Fix PR comments 2022-06-01 18:06:20 +02:00
helpers Export milli's heed from meilisearch-lib 2022-03-24 15:30:10 +01:00
routes feat(auth): Paginate API keys listing 2022-06-07 17:37:48 +02:00
error.rs feat(auth): API keys 2021-12-06 09:52:41 +01:00
lib.rs Add indexUid filtering on the /tasks route 2022-05-31 11:33:20 +02:00
main.rs fmt 2022-06-07 03:50:39 +08:00
option.rs Add version flag 2022-04-12 15:22:36 -04:00
task.rs Rename TaskType::from_str parameter to 'type_' 2022-06-08 19:57:45 -04:00