diff --git a/src/utils/helpers/redux.ts b/src/utils/helpers/redux.ts index f55518a9..69309bf9 100644 --- a/src/utils/helpers/redux.ts +++ b/src/utils/helpers/redux.ts @@ -1,7 +1,12 @@ import { createAsyncThunk as baseCreateAsyncThunk, AsyncThunkPayloadCreator } from '@reduxjs/toolkit'; +import { identity } from 'ramda'; import { ShlinkState } from '../../container/types'; export const createAsyncThunk = ( typePrefix: string, - payloadCreator: AsyncThunkPayloadCreator, -) => baseCreateAsyncThunk(typePrefix, payloadCreator); + payloadCreator: AsyncThunkPayloadCreator, +) => baseCreateAsyncThunk( + typePrefix, + payloadCreator, + { serializeError: identity }, + );