Skip to content

Commit a955c50

Browse files
authored
Merge pull request #2112 from v-lax/master
2 parents 0e100ba + 7ca2790 commit a955c50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/rtk-query/usage/customizing-queries.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ const api = createApi({
950950
async queryFn(_arg, _queryApi, _extraOptions, fetchWithBQ) {
951951
// get a random user
952952
const randomResult = await fetchWithBQ('users/random')
953-
if (randomResult.error) throw randomResult.error
953+
if (randomResult.error) return { error: randomResult.error as FetchBaseQueryError }
954954
const user = randomResult.data as User
955955
const result = await fetchWithBQ(`user/${user.id}/posts`)
956956
return result.data

0 commit comments

Comments
 (0)