The grid (core) ยท console.warn
the cluster refused the credential; supply a...
Printed by The grid (core), prefixed [lattice], since 1.77.0.
Warnings reference › source.elasticsearch.auth
- Identifier
source.elasticsearch.auth- Raised by
- The grid (core)
- Since
- 1.77.0
What happened
The cluster answered with 401 or 403. The call is thrown as an ElasticsearchError as well as named, so the grid surfaces an error rather than an empty result: a refused credential that looked like "no matching documents" would be the worst possible silence.
The fix
Put a valid API key or user and password in headers, or supply a fetch that sets Authorization per request when the credential expires. The adapter never stores or refreshes one.
The smallest fix
elasticsearchAdapter({ url, index, headers: { Authorization: `ApiKey ${key}` } });
Reference
Covered in full at the API reference.