-
Notifications
You must be signed in to change notification settings - Fork 224
Closed
algolia/api-clients-automation
#4298Labels
Description
Description
The following request will fail:
const response = await personalizationClient.setPersonalizationStrategy({
eventScoring: [{ score: 42, eventName: 'Algolia', eventType: 'click' }],
facetScoring: [{ score: 42, facetName: 'Event' }],
personalizationImpact: 42,
});
The personalizationClient
expects the properties eventScoring
and facetScoring
whereas the underlying API expects the pluralised eventsScoring
and facetsScoring
.
The API docs also incorrectly use the non plural property names https://www.algolia.com/doc/rest-api/personalization/#tag/strategies
Client
Personalization
Version
5.18.0
Relevant log output
ApiError: Unknown field "eventScoring"
at deserializeFailure (node_modules/@algolia/client-common/src/transporter/helpers.ts:91:12)
at retry (node_modules/@algolia/client-common/src/transporter/createTransporter.ts:194:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async run (src/scripts/configure-algolia-personalisation.ts:64:22) {
stackTrace: [
{
request: [Object],
response: [Object],
host: [Object],
triesLeft: 0
}
],
status: 422
}