Skip to content

Commit 3ad3e26

Browse files
Add default value of error field in task to null for v0.30.0 (#1389)
* Add compatibility with pagination feature * Make offset and limit optionnal in search response * Make estimated total hits optional * Add totalHits in searchResponse * Add tests coverage of new parameters * Re-order types * Add version * Remove unecessary tests on return respon se * Fix pagination tests * Fix typed search * fix get search tests * Fix tests * Unskip test * Add new filters on get tasks for v0.30 of Meilisearch * Revert last commit * Add default value of error field in task to null for v0.30.0 * Update tests/task.test.ts Co-authored-by: Bruno Casali <[email protected]> Co-authored-by: Bruno Casali <[email protected]>
1 parent 8e3abb3 commit 3ad3e26

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/types/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ export type TaskObject = Omit<EnqueuedTaskObject, 'taskUid'> & {
309309
// Query parameters used to filter the tasks
310310
originalQuery?: string
311311
}
312-
error?: MeiliSearchErrorInfo
312+
error: MeiliSearchErrorInfo | null
313313
duration: string
314314
startedAt: string
315315
finishedAt: string

tests/task.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ describe.each([{ permission: 'Master' }, { permission: 'Admin' }])(
7070
expect(task.finishedAt).toBeInstanceOf(Date)
7171
expect(task.startedAt).toBeDefined()
7272
expect(task.startedAt).toBeInstanceOf(Date)
73+
expect(task.error).toBeNull()
7374
})
7475

7576
test(`${permission} key: Get one task with index instance`, async () => {

0 commit comments

Comments
 (0)