-
Notifications
You must be signed in to change notification settings - Fork 24
Batch #13 of ErrorCodeV1 removal (see #2285) #2323
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
Changes from all commits
62a7066
67cf273
d336c4e
6aff225
1d8b180
39f35db
9388884
cbfd867
1bf1533
96d6d27
0d13d9a
34f0014
fa196c8
60f9adc
3ce05db
202d63f
a1ada16
3cb0c1a
78b1b3f
752ad7b
a3565e1
e7bfeba
fc369f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,10 @@ public enum ErrorCodeV1 { | |
|
|
||
| // CreateCollection error codes: | ||
|
|
||
| EXISTING_TABLE_NOT_DATA_API_COLLECTION("Existing table is not a valid Data API collection"), | ||
| COLLECTION_CREATION_ERROR( | ||
| "Collection creation failure (unable to create table). Recommend re-creating the collection"), | ||
| EMBEDDING_SERVICE_NOT_CONFIGURED( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved next to related codes; to be converted in follow-up PR. |
||
| "Unable to vectorize data, embedding service not configured for the collection "), | ||
| INDEXES_CREATION_FAILED("Index creation failed, check schema"), | ||
| INVALID_INDEXING_DEFINITION("Invalid indexing definition"), | ||
| INVALID_JSONAPI_COLLECTION_SCHEMA("Not a valid json api collection schema"), | ||
|
|
@@ -46,8 +49,6 @@ public enum ErrorCodeV1 { | |
| UNSUPPORTED_UPDATE_DATA_TYPE("Unsupported update data type"), | ||
|
|
||
| UNSUPPORTED_UPDATE_OPERATION("Unsupported update operation"), | ||
| EMBEDDING_SERVICE_NOT_CONFIGURED( | ||
| "Unable to vectorize data, embedding service not configured for the collection "), | ||
|
|
||
| UNSUPPORTED_UPDATE_OPERATION_MODIFIER("Unsupported update operation modifier"), | ||
|
|
||
|
|
@@ -81,13 +82,6 @@ public enum ErrorCodeV1 { | |
| HYBRID_FIELD_UNSUPPORTED_SUBFIELD_VALUE_TYPE( | ||
| "Unsupported JSON value type for '$hybrid' sub-field"), | ||
|
|
||
| COLLECTION_CREATION_ERROR( | ||
| "Collection creation failure (unable to create table). Recommend re-creating the collection"), | ||
| INVALID_SCHEMA_VERSION( | ||
| "Collection has invalid schema version. Recommend re-creating the collection"), | ||
| INVALID_QUERY("Invalid query"), | ||
| NO_INDEX_ERROR("Faulty collection (missing indexes). Recommend re-creating the collection"), | ||
|
|
||
| // Driver failure codes | ||
| /** Error codes related to driver exceptions. */ | ||
| SERVER_CLOSED_CONNECTION("Driver request connection is closed"), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,10 +33,13 @@ public enum Code implements ErrorCode<SchemaException> { | |
| CANNOT_RENAME_UNKNOWN_TYPE_FIELD, | ||
| CANNOT_VECTORIZE_NON_VECTOR_COLUMNS, | ||
| CANNOT_VECTORIZE_UNKNOWN_COLUMNS, | ||
| COLLECTION_EXISTS_WITH_DIFFERENT_SETTINGS, // converted from ErrorCodeV1 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. renaming undone: changed back to |
||
| COLLECTION_NOT_EXIST, // converted from ErrorCodeV1 | ||
| DEPRECATED_AI_MODEL, | ||
| END_OF_LIFE_AI_MODEL, | ||
|
|
||
| // from ErrorCodeV1 but used by clients DO NOT RENAME: | ||
| EXISTING_COLLECTION_DIFFERENT_SETTINGS, | ||
| EXISTING_TABLE_NOT_DATA_API_COLLECTION, // converted from ErrorCodeV1 | ||
| INVALID_CREATE_COLLECTION_OPTIONS, | ||
| INVALID_FORMAT_FOR_INDEX_CREATION_COLUMN, | ||
| INVALID_USER_DEFINED_TYPE_NAME, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ | |
| # | ||
| # "snippets" is a list of text snippets than can be included in any error body, the snippets are included in the | ||
| # variables when running the template for the body of the error. Snippets are referenced using `${SNIPET.<NAME>}` | ||
| # variables when running the template for the body of the error. Snippets are referenced using `${SNIPET.<NAME>}` | ||
| # where <NAME> is the name of the snippet key. | ||
| # Each snippet has: | ||
| # - name: UPPER_SNAKE_CASE_1 | ||
|
|
@@ -1181,17 +1182,9 @@ request-errors: | |
|
|
||
| Resend the command without dropping the indexed columns. | ||
|
|
||
| - scope: SCHEMA | ||
| code: COLLECTION_EXISTS_WITH_DIFFERENT_SETTINGS | ||
| title: Collection or table does not exist | ||
| body: |- | ||
| Collection '${collection}' already exists but with settings different from ones passed with 'createCollection' command. | ||
|
|
||
| If you need to change collection settings you will need to 'deleteCollection', then re-create with new settings. | ||
|
|
||
| - scope: SCHEMA | ||
| code: COLLECTION_NOT_EXIST | ||
| title: Collection already exists with different settings | ||
| title: Collection or table does not exist | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed an earlier copy-paste problem. |
||
| body: |- | ||
| No collection or table with name '${collection}' exists. | ||
|
|
||
|
|
@@ -1217,6 +1210,22 @@ request-errors: | |
|
|
||
| Resend the command using supported model. | ||
|
|
||
| - scope: SCHEMA | ||
| code: EXISTING_COLLECTION_DIFFERENT_SETTINGS | ||
| title: Collection already exists with different settings | ||
| body: |- | ||
| Collection '${collectionName}' already exists but with settings different from ones passed with 'createCollection' command. | ||
|
|
||
| If you need to change collection settings you will need to 'deleteCollection', then re-create with new settings. | ||
|
|
||
| - scope: SCHEMA | ||
| code: EXISTING_TABLE_NOT_DATA_API_COLLECTION | ||
| title: Existing table not a valid Data API collection | ||
| body: |- | ||
| Attempt to create new collection failed: table '${tableName}' already exists and it is not a valid Data API collection. | ||
|
|
||
| Recommend deleting the table and resending the command. | ||
|
|
||
| - scope: SCHEMA | ||
| code: CANNOT_VECTORIZE_UNKNOWN_COLUMNS | ||
| title: Columns cannot be vectorized if they are not defined in the table schema | ||
|
|
@@ -2062,6 +2071,24 @@ server-errors: | |
|
|
||
| # DATABASE scope server errors | ||
|
|
||
| - scope: DATABASE | ||
| code: COLLECTION_NO_INDEX_ERROR | ||
| title: Collection missing index(es) | ||
| body: |- | ||
| Faulty collection (missing index(es)). | ||
| Recommend re-creating the collection. | ||
|
|
||
| ${SNIPPET.RETRY_UNKNOWN} | ||
|
|
||
| - scope: DATABASE | ||
| code: COLLECTION_SCHEMA_VERSION_INVALID | ||
| title: Collection schema version invalid | ||
| body: |- | ||
| Collection '${collectionName}' has invalid schema version (${schemaVersion}). | ||
| Recommend re-creating the collection. | ||
|
|
||
| ${SNIPPET.RETRY_UNKNOWN} | ||
|
|
||
| - scope: DATABASE | ||
| code: COUNT_READ_FAILED | ||
| title: Count read failed | ||
|
|
@@ -2081,6 +2108,41 @@ server-errors: | |
|
|
||
| Report the problem to database administrators. | ||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These were moved to alphabetic position, not changed in any way. |
||
| - scope: DATABASE | ||
| code: FAILED_CONCURRENT_OPERATIONS | ||
| title: Failed to complete concurrent operations on the database | ||
| body: |- | ||
| The Data API command was unable to complete an operation on a document or row due to concurrent modifications from other requests. | ||
|
|
||
| This should be a rare error, it occurs when multiple requests attempt to modify the same document or row at the same time. The Data API has retried the operation multiple times, but was unable to complete it before another request modified the same document or row. This may indicate a "hot row" in your database, or low resources slowing down the database. | ||
|
|
||
| NOTE: If the request updated multiple documents or rows, some of the updates may have completed successfully. Check the response for partial success information. | ||
|
|
||
| The command used the keyspace and table or collection: ${keyspace}.${table}. | ||
|
|
||
| ${SNIPPET.RETRY} | ||
|
|
||
| - scope: DATABASE | ||
| code: FAILED_TO_CONNECT_TO_DATABASE | ||
| title: Data API Failed to connect to the database | ||
| body: |- | ||
| The Data API was unable to connect to any nodes in the database to process the command. | ||
|
|
||
| This may be due to a temporary capacity issue with the database, or a wider outage. | ||
|
|
||
| The command used the keyspace and table or collection: ${keyspace}.${table}. | ||
|
|
||
| ${SNIPPET.RETRY} | ||
|
|
||
| - scope: DATABASE | ||
| code: INVALID_COLLECTION_QUERY | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Renamed from |
||
| title: Invalid query | ||
| body: |- | ||
| Invalid query against a collection. | ||
| Underlying problem: ${errorMessage}. | ||
|
|
||
| ${SNIPPET.RETRY_UNKNOWN} | ||
|
|
||
| - scope: DATABASE | ||
| code: UNEXPECTED_DOCUMENT_ID_TYPE | ||
| title: Unexpected stored document id type | ||
|
|
@@ -2120,18 +2182,6 @@ server-errors: | |
|
|
||
| ${SNIPPET.RETRY} | ||
|
|
||
| - scope: DATABASE | ||
| code: FAILED_TO_CONNECT_TO_DATABASE | ||
| title: Data API Failed to connect to the database | ||
| body: |- | ||
| The Data API was unable to connect to any nodes in the database to process the command. | ||
|
|
||
| This may be due to a temporary capacity issue with the database, or a wider outage. | ||
|
|
||
| The command used the keyspace and table or collection: ${keyspace}.${table}. | ||
|
|
||
| ${SNIPPET.RETRY} | ||
|
|
||
| - scope: DATABASE | ||
| code: UNAUTHORIZED_ACCESS | ||
| title: Unauthorized access to the database | ||
|
|
@@ -2174,20 +2224,6 @@ server-errors: | |
|
|
||
| Retrying the command will likely result in the same error. | ||
|
|
||
| - scope: DATABASE | ||
| code: FAILED_CONCURRENT_OPERATIONS | ||
| title: Failed to complete concurrent operations on the database | ||
| body: |- | ||
| The Data API command was unable to complete an operation on a document or row due to concurrent modifications from other requests. | ||
|
|
||
| This should be a rare error, it occurs when multiple requests attempt to modify the same document or row at the same time. The Data API has retried the operation multiple times, but was unable to complete it before another request modified the same document or row. This may indicate a "hot row" in your database, or low resources slowing down the database. | ||
|
|
||
| NOTE: If the request updated multiple documents or rows, some of the updates may have completed successfully. Check the response for partial success information. | ||
|
|
||
| The command used the keyspace and table or collection: ${keyspace}.${table}. | ||
|
|
||
| ${SNIPPET.RETRY} | ||
|
|
||
| - scope: DATABASE | ||
| code: FAILED_COMPARE_AND_SET | ||
| title: Failed database Compare and Set operation | ||
|
|
||
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.
Cannot yet convert this one due to the way it is returned (not throw) in
CreateCollectionOperation, handle after @amorton's refactoring of DB access.