Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Error Format (#61)
Browse files Browse the repository at this point in the history
* Patch GeoSearch specification to mention technical limit on `desc` ordering around a _geoPoint (#66)

* mention decision and expected behavior for a desc ordering around a geoPoint

* add desc ordering around a geoPoint as a future possibility

* add descending order capability for _geoPoint built-in sort (#77)

* Sort (#55)

* initialize sort specification

* wip specification body

* fix typos and details

* Add OpenAPI changes

* Rename API routes

* fix typo

* add a part about measuring success

* specify metrics to send on Amplitude

* add lexicographical order for string type

* Typos, invalid_sort error definition

* Apply suggestions from code review

Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>

* remove non correct information about mistyped ranking rule that do not raise error

* fix typos from reviews

* Update text/0055-sort.md

Co-authored-by: gui machiavelli <gui@meilisearch.com>

Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
Co-authored-by: gui machiavelli <gui@meilisearch.com>

* Initialize draft specification for error object format

* reorganize and fix typos

* update oas with the new error format

* Add full list of errors

* Add invalid_geo_field error description

* Add task_not_found definition

* Add mention of error object fields order in response

* Apply suggestions from code review

Co-authored-by: gui machiavelli <gui@meilisearch.com>

* enhance the missing_primary_key error

* add know variants for message for a given error

* fix oas

* remove invalid_sort variant message for _geoPoint descending order

* fix typos

* sync new variants with geosearch error handling on ranking rule

* Update variants for invalid_filter and invalid_sort regarding geosearch

* add missing dot at the end of error message

* experiment bump.sh diff fixs

* update bump.yml

* update errors in oas

Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
Co-authored-by: gui machiavelli <gui@meilisearch.com>
  • Loading branch information
3 people committed Nov 1, 2021
1 parent 68c91cc commit 02ae407
Show file tree
Hide file tree
Showing 3 changed files with 955 additions and 30 deletions.
1 change: 0 additions & 1 deletion .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- main
- develop

jobs:
api-diff:
if: ${{ github.event_name == 'pull_request' }}
Expand Down
58 changes: 29 additions & 29 deletions open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -493,17 +493,17 @@ components:
properties:
message:
type: string
errorCode:
code:
type: string
errorType:
type:
type: string
errorLink:
link:
type: string
required:
- message
- errorCode
- errorType
- errorLink
- code
- type
- link
description: ''
parameters:
indexUid:
Expand Down Expand Up @@ -683,10 +683,10 @@ components:
examples:
Unauthorized:
value:
message: You must have an authorization token
errorCode: missing_authorization_header
errorType: authentication_error
errorLink: 'https://docs.meilisearch.com/errors#missing_authorization_header'
message: The X-MEILI-API-KEY header is missing.
code: missing_authorization_header
type: auth
link: 'https://docs.meilisearch.com/errors#missing_authorization_header'
'413':
description: Payload Too Large
content:
Expand All @@ -696,10 +696,10 @@ components:
examples:
Payload Too Large:
value:
message: Payload reached size limit.
errorCode: payload_too_large
errorType: invalid_request_error
errorLink: 'https://docs.meilisearch.com/errors#payload_too_large'
message: The payload cannot exceed `:payloadSizeLimit`.
code: payload_too_large
type: invalid_request
link: 'https://docs.meilisearch.com/errors#payload_too_large'
securitySchemes:
apiKey:
type: apiKey
Expand Down Expand Up @@ -817,9 +817,9 @@ paths:
Not Found:
value:
message: Dump `20201001-110357260` not found
errorCode: not_found
errorType: invalid_request_error
errorLink: 'https://docs.meilisearch.com/errors#not_found'
code: dump_not_found
type: invalid_request
link: 'https://docs.meilisearch.com/errors#dump_not_found'
parameters:
- schema:
type: string
Expand Down Expand Up @@ -924,16 +924,16 @@ paths:
examples:
Index already exists:
value:
message: Index already exists.
errorCode: index_already_exists
errorType: invalid_request_error
errorLink: 'https://docs.meilisearch.com/errors#index_already_exists'
message: Index `:indexUid` already exists.
code: index_already_exists
type: invalid_request
link: 'https://docs.meilisearch.com/errors#index_already_exists'
Invalid Index Uid:
value:
message: 'Index must have a valid uid; Index uid can be of type integer or string only composed of alphanumeric characters, hyphens (-) and underscores (_).'
errorCode: invalid_index_uid
errorType: invalid_request_error
errorLink: 'https://docs.meilisearch.com/errors#invalid_index_uid'
message: 'Index `:indexUid` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).'
code: invalid_index_uid
type: invalid_request
link: 'https://docs.meilisearch.com/errors#invalid_index_uid'
'401':
$ref: '#/components/responses/401'
parameters:
Expand Down Expand Up @@ -1002,10 +1002,10 @@ paths:
examples:
Primary Key Already Present:
value:
message: A primary key is already present. It's impossible to update it
errorCode: primary_key_already_present
errorType: invalid_request_error
errorLink: 'https://docs.meilisearch.com/errors#primary_key_already_present'
message: Index `:indexUid` already has a primary key.
code: index_primary_key_already_exists
type: invalid_request
link: 'https://docs.meilisearch.com/errors#index_primary_key_already_exists'
'401':
$ref: '#/components/responses/401'
'404':
Expand Down
Loading

0 comments on commit 02ae407

Please sign in to comment.