fix(integrations): address code-review findings
n8n: throw on FAILED memory events (was silently returned), poll on any non-terminal status (PENDING or RUNNING), use top_k (not limit) for search, coerce search/getAll responses to arrays, guard invalid-JSON metadata, reject empty updates, mark user_id required; lint clean. Zapier: coerce boolean fields (String(x) !== 'false') + boolean defaults so "Wait"/"Infer = No" are honored, throw on HTTP >= 400 (was silent empty/fake-success), throw on FAILED events, use top_k, numeric coercion with clamping, mark user_id required.
This commit is contained in:
@@ -66,4 +66,14 @@ describe('Mem0 Zapier integration (E2E)', () => {
|
||||
});
|
||||
expect(afterDelete.length).toBe(0);
|
||||
});
|
||||
|
||||
it('surfaces API errors instead of returning an empty array (search needs a filter)', async () => {
|
||||
// filters is required by the API; omitting it must throw, not return [].
|
||||
await expect(
|
||||
appTester(App.searches.search_memories.operation.perform, {
|
||||
authData,
|
||||
inputData: { query: 'anything' },
|
||||
}),
|
||||
).rejects.toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user