Skip to content
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

If collection is missing from ingesting Item, a low-level OpenSearch client error occurs rather than a clear invalid response #580

Open
philvarner opened this issue Aug 14, 2023 · 0 comments
Labels

Comments

@philvarner
Copy link
Collaborator

If collection is missing from ingesting Item, a low-level OpenSearch client error occurs:

{
    "level": "error",
    "message": "Error while ingesting item Missing required parameter: index",
    "name": "ConfigurationError",
    "stack": "ConfigurationError: Missing required parameter: index\n    at IndicesApi.indicesExistsApi [as exists] (/var/task/index.js:6779:17)\n    at writeRecordToDb (/var/task/index.js:62664:41)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async ingestItems (/var/task/index.js:62727:16)\n    at async Runtime.handler (/var/task/index.js:63194:21)"
}

The code path here is that the Item is checked that it has a Feature type and then the collection is retrieved to check in an index with that name exists, without checking that the collection field is actually defined.

Instead, there should be a validation that the collection field is defined.

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

No branches or pull requests

1 participant