Skip to content

Commit 028a990

Browse files
authored
Merge pull request #2538 from MichielTondeur/fix_error_message_typo
2 parents adf7d01 + 31f6fe3 commit 028a990

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

packages/toolkit/src/query/core/buildThunks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ export function buildThunks<
352352
process.env.NODE_ENV === 'development'
353353
) {
354354
console.error(
355-
`An unhandled error occured processing a request for the endpoint "${arg.endpointName}".
355+
`An unhandled error occurred processing a request for the endpoint "${arg.endpointName}".
356356
In the case of an unhandled error, no tags will be "provided" or "invalidated".`,
357357
error
358358
)

packages/toolkit/src/query/tests/devWarnings.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ describe('`console.error` on unhandled errors during `initiate`', () => {
287287
await store.dispatch(api.endpoints.baseQuery.initiate())
288288

289289
expect(getLog().log)
290-
.toBe(`An unhandled error occured processing a request for the endpoint "baseQuery".
290+
.toBe(`An unhandled error occurred processing a request for the endpoint "baseQuery".
291291
In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: this was kinda expected]`)
292292
})
293293

@@ -311,7 +311,7 @@ In the case of an unhandled error, no tags will be "provided" or "invalidated".
311311
await store.dispatch(api.endpoints.queryFn.initiate())
312312

313313
expect(getLog().log)
314-
.toBe(`An unhandled error occured processing a request for the endpoint "queryFn".
314+
.toBe(`An unhandled error occurred processing a request for the endpoint "queryFn".
315315
In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: this was kinda expected]`)
316316
})
317317

@@ -336,7 +336,7 @@ In the case of an unhandled error, no tags will be "provided" or "invalidated".
336336
await store.dispatch(api.endpoints.transformRspn.initiate())
337337

338338
expect(getLog().log)
339-
.toBe(`An unhandled error occured processing a request for the endpoint "transformRspn".
339+
.toBe(`An unhandled error occurred processing a request for the endpoint "transformRspn".
340340
In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: this was kinda expected]`)
341341
})
342342

@@ -363,7 +363,7 @@ In the case of an unhandled error, no tags will be "provided" or "invalidated".
363363
await store.dispatch(api.endpoints.prep.initiate())
364364

365365
expect(getLog().log)
366-
.toBe(`An unhandled error occured processing a request for the endpoint "prep".
366+
.toBe(`An unhandled error occurred processing a request for the endpoint "prep".
367367
In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: this was kinda expected]`)
368368
})
369369

@@ -393,7 +393,7 @@ In the case of an unhandled error, no tags will be "provided" or "invalidated".
393393
await store.dispatch(api.endpoints.val.initiate())
394394

395395
expect(getLog().log)
396-
.toBe(`An unhandled error occured processing a request for the endpoint "val".
396+
.toBe(`An unhandled error occurred processing a request for the endpoint "val".
397397
In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: this was kinda expected]`)
398398
})
399399
})

packages/toolkit/src/query/tests/fakeBaseQuery.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ test('fakeBaseQuery throws when invoking query', async () => {
127127
await expect(async () => {
128128
result = await store.dispatch(thunk)
129129
}).toHaveConsoleOutput(
130-
`An unhandled error occured processing a request for the endpoint "withQuery".
130+
`An unhandled error occurred processing a request for the endpoint "withQuery".
131131
In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: When using \`fakeBaseQuery\`, all queries & mutations must use the \`queryFn\` definition syntax.]`
132132
)
133133

packages/toolkit/src/query/tests/queryFn.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ describe('queryFn base implementation tests', () => {
179179
result = await store.dispatch(thunk)
180180
}).toHaveConsoleOutput(
181181
endpointName.includes('Throw')
182-
? `An unhandled error occured processing a request for the endpoint "${endpointName}".
182+
? `An unhandled error occurred processing a request for the endpoint "${endpointName}".
183183
In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: resultFrom(${endpointName})]`
184184
: ''
185185
)
@@ -227,7 +227,7 @@ describe('queryFn base implementation tests', () => {
227227
result = await store.dispatch(thunk)
228228
}).toHaveConsoleOutput(
229229
endpointName.includes('Throw')
230-
? `An unhandled error occured processing a request for the endpoint "${endpointName}".
230+
? `An unhandled error occurred processing a request for the endpoint "${endpointName}".
231231
In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: resultFrom(${endpointName})]`
232232
: ''
233233
)
@@ -262,7 +262,7 @@ describe('queryFn base implementation tests', () => {
262262
await expect(async () => {
263263
result = await store.dispatch(thunk)
264264
}).toHaveConsoleOutput(
265-
`An unhandled error occured processing a request for the endpoint "withNeither".
265+
`An unhandled error occurred processing a request for the endpoint "withNeither".
266266
In the case of an unhandled error, no tags will be "provided" or "invalidated". [TypeError: endpointDefinition.queryFn is not a function]`
267267
)
268268
expect(result!.error).toEqual(
@@ -280,7 +280,7 @@ describe('queryFn base implementation tests', () => {
280280
await expect(async () => {
281281
result = await store.dispatch(thunk)
282282
}).toHaveConsoleOutput(
283-
`An unhandled error occured processing a request for the endpoint "mutationWithNeither".
283+
`An unhandled error occurred processing a request for the endpoint "mutationWithNeither".
284284
In the case of an unhandled error, no tags will be "provided" or "invalidated". [TypeError: endpointDefinition.queryFn is not a function]`
285285
)
286286
expect((result as any).error).toEqual(
@@ -379,7 +379,7 @@ describe('usage scenario tests', () => {
379379
api.endpoints.getMissingFirebaseUser.initiate(1)
380380
)
381381
})
382-
.toHaveConsoleOutput(`An unhandled error occured processing a request for the endpoint "getMissingFirebaseUser".
382+
.toHaveConsoleOutput(`An unhandled error occurred processing a request for the endpoint "getMissingFirebaseUser".
383383
In the case of an unhandled error, no tags will be "provided" or "invalidated". [Error: Missing user]`)
384384

385385
expect(result!.data).toBeUndefined()

0 commit comments

Comments
 (0)