We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20bda1d commit eaa18ecCopy full SHA for eaa18ec
connectors/meilisearch/client.js
@@ -1,5 +1,6 @@
1
'use strict'
2
const { MeiliSearch } = require('meilisearch')
3
+const packageJson = require('../../package.json')
4
5
/**
6
* Custom Meilisearch Error class more suited to Strapi environment.
@@ -35,7 +36,10 @@ class MeiliSearchError extends Error {
35
36
*/
37
module.exports = config => {
38
try {
- return new MeiliSearch(config)
39
+ return new MeiliSearch({
40
+ ...config,
41
+ clientAgents: [`Meilisearch Strapi ${packageJson.version}`],
42
+ })
43
} catch (e) {
44
console.error(e)
45
throw new MeiliSearchError({
0 commit comments