-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
…icate_index_found
…bad_request; + add TODO bad_request we forgot
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.
Sharing comments with you @irevoire (Also signaling to @Kerollmops and @curquiza for an update)
I've used //TODO
marker in the spec for now for the following reasons:
- Marking
message
field of the newly introduced error codes (We should re-use the previous message when it was abad_request
and generated by serde to move fast, I think) - I've marked the 2 asynchronous errors that we wanted to make synchronous initially
… Add missing bad_request error_code on GET /tasks
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.
Hi @gmourier I read the spec and suggested some changes. Feel free to ignore them if you want to!
The following codes seem to be removed based on the spec; my bad if some are not.
Questions:
|
Yes, every time we can’t link the error to a specific field. |
354ef49
to
45ae7dc
Compare
45ae7dc
to
176f6e9
Compare
…id is specified in the request payload
9bc77ce
to
965aa9d
Compare
… Index API Resource
Co-authored-by: Bruno Casali <brunoocasali@gmail.com>
1438: Update error codes for Meilisearch v1.0.0 r=bidoubiwa a=bidoubiwa See [specification](meilisearch/specifications#212) Co-authored-by: Charlotte Vermandel <charlottevermandel@gmail.com>
* Bump open-api spec * Simplify dump version section since v1.0 can import all dumps (#203) * Simplify dump version section since v1.0 can import all dumps * Relax target import version Co-authored-by: Clémentine Urquizar - curqui <clementine@meilisearch.com> --------- Co-authored-by: Clémentine Urquizar - curqui <clementine@meilisearch.com> * Rename dump command from `--dumps-dir` to `--dump-dir` (#204) * Propagate the change to --dumps-dir to the specification * Rename section header in openAPI documentation * Dump destination -> Dump directory * Finish destination -> directory renaming Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com> --------- Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com> * Update the specification of soft-deleted documents (#206) * Grammarly'd soft-deletion page * Soft-deleted: update the functional specification * Remove `--max-index-size` and `--max-task-db-size` (#207) * Robustify Primary Key Inference - Update related errors (#208) * update inference errors * Add `index_` prefix to newly-introduced error codes Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com> * Update error messages following meilisearch/meilisearch#3301 --------- Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com> * Reject master keys shorter than 16 bytes in `production` (#209) * Specify what happens when too short a master key is provided * Change error message * Characters -> bytes for master key length * Specify Error and Warning messages regarding the master-key * Update text/0119-instance-options.md * Update text/0119-instance-options.md * Specify warning messages when a master key is missing or lower than 16 bytes in env development * Apply suggestions from code review Co-authored-by: Maryam <90181761+maryamsulemani97@users.noreply.github.com> * Replace export MEILI_MASTER_KEY by --master-key * Apply suggestions from code review Co-authored-by: Louis Dureuil <louis.dureuil@gmail.com> --------- Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com> Co-authored-by: Maryam <90181761+maryamsulemani97@users.noreply.github.com> * Add `OFF` log level to spec (#211) * Errors handling enhancement (#212) * Replace invalid_duplicate_index_found error code to invalid_swap_duplicate_index_found * Remove bad_request for settings properties error; replaced with dedicated error codes * cleaning old bad usage of the spec and replaces it with relevant information * Split search bad_request error code to dedicated error code * Catch-up: remove unused dump_not_found error code * Do an update pass on old specs format * Details context, variant cases * Add system type;Split invalid_task_date_filter to dedicated error codes * Precise index API bad_request error code to dedicated one * Precise bad_request to a dedicated code for the swap indexes API * Use invalid_index_primary_key when ?primaryKey is invalid instead of bad_request; + add TODO bad_request we forgot * marking missed bad_request on /keys * Add missed bad_request codes for GET /keys * Add missed bad_request codes for GET /documents * Removes _filter suffix from query parameter error_code for tasks API; Add missing bad_request error_code on GET /tasks * Add missing bad_request error codes on GET /indexes * remove future possibilities * Replace search_Parameter by search into the /search error codes naming * Replace bad_request code when the mandatory uid is missing when posting an index resource; split the generic missing_parameter to dedicated error codes * fix sentence sense * Split immutable_field to dedicated api key fields * Removes missing todo marker; Add missing part * Add suggested review comments * Catch-up/Add when an invalid index uid is gen for the :indexUid path parameter * Add immutable_index_uid error code on PATCH /indexes/:indexUid when uid is specified in the request payload * invalid_settings_ranking_rules can only be synchronous * Details async/sync case for error related to minWordsSizeForTypos object * Add immutable_index_created_at and immutable_index_updated_at for the Index API Resource * Add missing_swap_indexes on the POST swap-indexes resource * Update text/0061-error-format-and-definitions.md Co-authored-by: Bruno Casali <brunoocasali@gmail.com> * merge the :deserr_helper and the :deserr_location * Rephrase and catch-up miss * get rids of the index_not_accessible error code since no one remember about it --------- Co-authored-by: Bruno Casali <brunoocasali@gmail.com> Co-authored-by: Tamo <tamo@meilisearch.com> * Add error message when doing a migration (#213) * Add the migration CLI error * Update text/0105-dumps-api.md --------- Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com> * Merge snapshot options (#214) * Merge `--schedule-snapshot` and `--snapshot-interval-sec` options * Update text/0119-instance-options.md --------- Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com> * Remove any reference to the disable-auto-batching argument (#215) Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com> * Specify the effect of the `*` value when used in the task filters (#218) --------- Co-authored-by: Louis Dureuil <louis.dureuil@gmail.com> Co-authored-by: Clémentine Urquizar - curqui <clementine@meilisearch.com> Co-authored-by: Maryam <90181761+maryamsulemani97@users.noreply.github.com> Co-authored-by: Bruno Casali <brunoocasali@gmail.com> Co-authored-by: Tamo <tamo@meilisearch.com> Co-authored-by: Clément Renault <clement@meilisearch.com>
🤖 API Diff Put the link of the GitHub comment generated by bump.sh if generated; Apply the
OpenApi
label n/aSummary
meilisearch/meilisearch#3246
bad_request
linked to a property/parameter with dedicated error codesmissing_parameter
with dedicated error codesno_space_left_on_device
coming from theinternal
type to a newly introducedsystem
typetoo_many_open_files
error code tosystem
io_error
error code tosystem
immutable_field
with dedicated error codes (used for the/keys
API and/indexes
API on thePATCH
method)bad_request
variant when an unknown field is giveninvalid_task_index_uids
error codeChanges
code
propertySwap API
POST
/swap-indexes
→duplicate_index_found
invalid_swap_duplicate_index_found
✅ [RENAME]indexes
array not containing exactly 2 indexUids for a swap operation object returns abad_request
error ->invalid_swap_indexes
✅ [NEW]indexes
array returns aninvalid_swap_indexes
error ✅indexes
array in a swap payload returns amissing_swap_indexes
error ✅ [NEW]Index API
GET
/indexes
limit
parameter errorbad_request
→invalid_index_limit
✅ [NEW]offset
parameter errorbad_request
→invalid_index_offset
✅ [NEW]GET
/indexes/:indexUid
:indexUid
path parameter returns aninvalid_index_uid
error ✅POST
/indexes
bad_request
whenuid
is missing in the payload →missing_index_uid
✅ [NEW]string
ornull
forprimaryKey
will return abad_request
error →invalid_index_primary_key
✅ [NEW]PATCH
/indexes/:indexUid
:indexUid
path parameter returns aninvalid_index_uid
error ✅string
ornull
forprimaryKey
will return abad_request
error →invalid_index_primary_key
✅ [NEW]uid
property returns animmutable_index_uid
error ✅ [NEW]createdAt
property returns animmutable_index_created_at
error ✅ [NEW]updatedAt
property returns animmutable_index_updated_at
error ✅ [NEW]DELETE
/indexes/:indexUid
:indexUid
path parameter returns aninvalid_index_uid
error ✅Documents API
GET
/indexes/:indexUid/documents
:indexUid
path parameter returns aninvalid_index_uid
✅fields
parameter errorbad_request
→invalid_document_fields
✅ [NEW]limit
parameter errorbad_request
→invalid_document_limit
✅ [NEW]offset
parameter errorbad_request
→invalid_document_offset
✅ [NEW]GET
/indexes/:indexUid/documents/:documentId
:indexUid
path parameter returns aninvalid_index_uid
✅fields
parameter errorbad_request
→invalid_document_fields
✅ [NEW]POST/PUT
/indexes/:indexUid/documents
:indexUid
path parameter returns aninvalid_index_uid
✅?primaryKey
parameter errorbad_request
→invalid_index_primary_key
✅ [NEW]DELETE
/indexes/:indexUid/documents
:indexUid
path parameter returns aninvalid_index_uid
✅DELETE
/indexes/:indexUid/documents/:documentId
:indexUid
path parameter returns aninvalid_index_uid
✅POST
/indexes/:indexUid/documents/delete-batch
:indexUid
path parameter returns aninvalid_index_uid
✅Search API ✅
GET/POST
/indexes/:indexUid/search
:indexUid
path parameter returns aninvalid_index_uid
✅bad_request
replaced by specific error codes per parameter👇invalid_search_q
[NEW]invalid_search_offset
[NEW]invalid_search_limit
[NEW]invalid_search_page
[NEW]invalid_search_hits_per_page
[NEW]invalid_search_attributes_to_retrieve
[NEW]invalid_search_attributes_to_crop
[NEW]invalid_search_crop_length
[NEW]invalid_search_attributes_to_highlight
[NEW]invalid_search_show_matches_position
[NEW]->invalid_filter
invalid_search_filter
[RENAME]->invalid_sort
invalid_search_sort
[RENAME]invalid_search_facets
[NEW]invalid_search_highlight_pre_tag
[NEW]invalid_search_highlight_post_tag
[NEW]invalid_search_crop_marker
[NEW]invalid_search_matching_strategy
[NEW]Settings API ✅
:indexUid
path parameter returns aninvalid_index_uid
✅bad_request
replaced by specific error codes per parameter/object👇**invalid_settings_displayed_attributes
[NEW]invalid_settings_searchable_attributes
[NEW]->invalid_filter
invalid_settings_filterable_attributes
[RENAME]->invalid_sort
invalid_settings_sortable_attributes
[RENAME]invalid_settings_ranking_rules
[NEW]invalid_settings_stop_words
[NEW]invalid_settings_synonyms
[NEW]invalid_settings_distinct_attribute
[NEW]invalid_settings_typo_tolerance
[NEW](Merged withinvalid_typo_tolerance_min_word_size_for_typos
invalid_settings_typo_tolerance
as a message variant☝️)invalid_settings_faceting
[NEW]invalid_settings_pagination
[NEW]Task API ✅
GET
/tasks
, POST/tasks/cancel
, DELETE/tasks
(Filters)✅invalid_task_date_filter
invalid_task_before_enqueued_at
[NEW]invalid_task_after_enqueued_at
[NEW]invalid_task_before_started_at
[NEW]invalid_task_after_started_at
[NEW]invalid_task_before_finished_at
[NEW]invalid_task_after_finished_at
[NEW]->invalid_task_uids_filter
invalid_task_uids
✅ [RENAME]->invalid_task_types_filter
invalid_task_types
✅ [RENAME]->invalid_task_statuses_filter
invalid_task_statuses
✅ [RENAME]->invalid_task_canceled_by_filter
invalid_task_canceled_by
✅ [RENAME]invalid_task_index_uids
✅ [NEW]limit
parameterbad_request
→invalid_task_limit
✅ [NEW] (Only for GET)from
parameterbad_request
→invalid_task_from
✅ [NEW] (Only for GET)Keys API
POST
/keys
✅missing_parameter
missing_api_key_actions
✅ [NEW]missing_api_key_indexes
✅ [NEW]missing_api_key_expires_at
✅ [NEW]PATCH
/keys/:key_or_uid
✅immutable_field
immutable_api_Key_uid
✅ [NEW]immutable_api_key_actions
✅ [NEW]immutable_api_key_indexes
✅ [NEW]immutable_api_key_expires_at
✅ [NEW]immutable_api_key_created_at
✅ [NEW]immutable_api_key_update_at
✅ [NEW]GET
/keys
limit
parameterbad_request
→invalid_api_key_limit
✅ [NEW]offset
parameterbad_request
→invalid_api_key_offset
✅ [NEW]Stats API
GET
/indexes/:indexUid/stats
:indexUid
path parameter returns aninvalid_index_uid
✅Misc
→invalid_geo_field
invalid_document_geo_field
✅ [RENAME](Catch-up) [REMOVED]dump_not_found
type
propertysystem
✅ [NEW]no_space_left_on_device
frominternal
tosystem
✅ [UPDATED]io_error
error code ✅ [NEW]too_many_open_files
error code ✅ [NEW]internal
[REMOVED]index_not_accessible
Out Of Scope
n/a
Attention To Reviewers
I hope to have captured all the changes that can be made to the generic errors; please pay special attention to ensure we don't miss any.
Please do not review the
message
field. We will do a DX pass in the future. Changing themessage
field content is not considered breaking.The OpenAPI spec never had full compliance with all our error codes; it will be added in another PR in the future.
Misc
OpenApi
label) n/aTelemetry
label) n/a